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
Explain the difference between object state and behavior?
What is chat area? Explain.
What restrictions are placed on the values of each case of a switch statement?
How primary key is implemented in Oracle?
Which class is the immediate superclass of the menucomponent class?
Define prototype?
What is glasgow?
Will the general public have access to the infobus apis?
Is the ternary operator written x : y ? Z or x ? Y : z ?
Why do I get a duplicate name error when loading a jar file?
Explain RMI Architecture?
What is the difference between long.class and long.type?
Name the eight primitive java types.
What is a modular application?
Where can I find seam examples and documentation?