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
What is .sh file in mac?
Explain what is a view?
What is tabular form?
What degree do database administrators need?
What are git repository hosting services you used?
What is protection boundary?
What is the effect of the internet of things have on healthcare segment?
What are merits and demerits of systems supporting multiple file structure and systems supporting a stream of bytes?
What are the function modules used in a sap script driver program?
How much does it cost to upgrade to windows 10?
Who maintains the CSS specifications?
Why cout is used in c++?
How do you update excel?
What are the important characteristics of soap envelope element?
What is a calculated field in excel?