Hello, in this Java programming video, we are going to look at the map dot entry feature. So we've looked at maps, pretty cool. And we can, you know, print out the map like so we can get an individual value from the map like so for a particular key. But how would you let's say loop over all of now the entire map, you'd use some sort of iterator. And this is where the entry aspect of it, you know, comes into play. So what we would want to do is basically to enter into a call in it equals and now what you want to do is get the name of the map, so map, dot entry set, and then do dot iterator and that will use this iterator object right here, to be able to loop over our entire Mac.
So to do that, while it next So while this, you know, still more values in the Mac, keep, you know, looping around. And what we're going to do, what we are going to do is going to create a map dot entry. And this is where the entry part of the source tutorial comes in. So you do map dot entry, because remember, it's not just a value or a key, it's both you might want to know both of them. So map dot entry. Like so, the data and I'm gonna call it just m equals, we're gonna cast the result of the next you know, return to a map entry map dot entry.
Like so and it got next And now we can just print them out. So what we can do is system dot print m dot get key. So we're going to get the key down. Dash and I will print it run through and get value. You run this out will print will comment out this one, so we don't get confused so that the entire map be printed out like so. And here, we've got it all printed out individually.
So if you want to loop over it, this is do it. So that's it for the map entry feature in Java. If you have any questions, feel free to reach out and I look forward to seeing you in the next Awesome job in video.