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 a class loader?
What is difference between object state and behavior?
What are synchronized methods and synchronized statements?
what is stringBuffer and StringBuilder?
Explain the stub's and skeleton's functionality?
whats is statement and procedure
What is ioc concept & explain it?
What is the lifecycle of an applet?
diff mvc1 and mvc2 wahts is mean by servlet chaining?
how can u cal servlet from java?
what is singleton class? where it mainly used in the projects?
hi, All are saying that now software field position is not good and in 5-10yrs total software field ll be saturated . is it true? i am unable decide ii continue in this field or not please tell me?