InterviewSolution
Saved Bookmarks
| 1. |
Can We Iterate Through A Map? |
|
Answer» Though we can't ITERATE a MAP as such but Map interface has methods which provide a set view of the Map. That set can be iterated. Those two methods are -
There is also a values() method in the Map that returns a Collection view of the values CONTAINED in this map. Though we can't iterate a Map as such but Map interface has methods which provide a set view of the Map. That set can be iterated. Those two methods are - There is also a values() method in the Map that returns a Collection view of the values contained in this map. |
|