Answer Posted / varun
HashMap<String, String> loans = new HashMap<String, String>();
loans.put("home loan", "citibank");
loans.put("personal loan", "Wells Fargo");
for (String key : loans.keySet()) {
System.out.println("------------------------------------------------");
System.out.println("Iterating or looping map using java5 foreach loop");
System.out.println("key: " + key + " value: " + loans.get(key));
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which javutil classes and interfaces support event handling?
What is Stream Tokenizer?
What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?
Difference between swing and awt?
What is the relationship between the canvas class and the graphics class?
Explain phantom read?
Explain what is orm?
Can I use javascript to submit a form?
What is the difference between session and entity beans?
What state does a thread enter when it terminates its processing?
Can we sent objects using Sockets?
What must a class do to implement an interface?
difference between ejb,struts,hibernate,spring and jsp
What is bean? Where can it be used?
Are we allowed to change the transaction isolation property in middle of a transaction?