How to iterate map in collection framework?
Answer Posted / navin kumar
Map<String,String> map = new HashMap<String,String>();
map.put("A","Rohan");
map.put("C","Sohan");
map.put("B","Ram");
for(String key : map.entrySet()){
sop(key);//A,C and B as key
sop(map.get(key))//Rohan,Sohan and Ram as values
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Under what circumstances would von use a while statement rather than for?
What is the relation between rss and xml?
Do I have to use jsps with my application?
do you prefer to work in a small, medium or large company?
In what ways you would know whether a system is unicode or non-unicode?
how to configure test cases in ue confermence testing
How many rows can xlsx handle?
Tell me why might quick sort might be better than merge sort?
Explain the types of string comparision function in PHP
What do you understand by blue prism process template?
How to add new elements dynamically?
How do I get to the boot menu in ubuntu?
How do I control what happens when I start ms word?
what is asymmetric clustering in web-sphere?
What is the difference between *p++ and (*p)++ ?