HashMap loop in java
This is how you loop through the Key Value pairs in a Hashmap
Iterator iter = values.keySet().iterator();
while (iter.hasNext()) {
String key = iter.next();
String value = values.get(key);
System.out.println("Key ="+key+"\n Value"+value)
}
Here, I have implicitly assumed that values is a HashMap but as you know it can be of any Object that you like. I just used it for string and felt it might be a good example if someone is looking for it
Iterator
while (iter.hasNext()) {
String key = iter.next();
String value = values.get(key);
System.out.println("Key ="+key+"\n Value"+value)
}
Here, I have implicitly assumed that values is a HashMap
Comments
By the way look at the design I've made myself High class escorts
purchase viagra online
व्यक्तिगत व्यवसायका लागि ऋण चाहिन्छ? तपाईं आफ्नो इमेल संपर्क भने उपरोक्त तुरुन्तै आफ्नो ऋण स्थानान्तरण प्रक्रिया गर्न
ठीक।