java HashMap Iterator
using for each loop
for (Map.Entry entry : hashMap.entrySet()) {
System.out.println("key,val: " + entry.getKey() + "," + entry.getValue());
}
using for each loop
for (Map.Entry entry : hashMap.entrySet()) {
System.out.println("key,val: " + entry.getKey() + "," + entry.getValue());
}
No comments:
Post a Comment