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
What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?
What are the pros and cons of detached objects?
What is meant by method chaining?
What is chat area? Explain.
What is the difference between the session.get() method and the session.load() method?
Can you control when passivation occurs?
What is ripple effect?
Which are the different segments of memory?
Why do I get a duplicate name error when loading a jar file?
Why use a datasource when you can directly specify a connection details?
how to use debug in my elipse to solve problems that exist in my project
Where can I ask questions and make suggestions about seam?
What is the difference between the ‘font’ and ‘fontmetrics’ class?
What is TL and its use?
What is JTS?