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 default length of textfield ?
difference between sql exception class and sql warning class
What is RMI Registry?
6 Answers Siemens, United Software Solutions,
what is JTS?
What are the states associated in the thread?
how we can implement interface in jsp ?
Hi frnds ,iam new to java and j2ee ,my requirement is using java or any j2eetech how to lock an user when he enter wrong credentials(uname&password) more than 3 times.take the username and passowrd in a bean no need to conned Db kindly provide me sample application code or and ideas or links or tutorials plzzzzz urgent for me thanks in advance...
How are the elements of a borderlayout organized?
what is stringBuffer and StringBuilder?
What is servlet preinitialization
what is DGC?
Why use a datasource when you can directly specify a connection details?