How do you iterate in Hashmap?
Answer / 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 |
What is JTS?
What happens when we invoke a thread?s interrupt method while it is in sleeping or waiting condition?
What is JasperReports?
How would you create a button with rounded edges?
what is the port number of RMI?
How a component can be placed on Windows?
hi friends, i have done my BE(CSE)at 2011 then i have joined one company before they asked me 50k so i paid but now they telling no project here so we r going to close like that so now i need any job i have good knowledge in core java and j2ee(jsp,servlet,jdbc) so if u know any job pl help me
Can I run seam with jdk 1.4 and earlier?
whats is mean by class.forName() whats the return type of class
What are the implicit objects?
What are the pros and cons of detached objects?
What is a convertor?