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 if the static modifier is removed from the signature of the main method?
Explain about RMI Architecture?
Can you give me a simple example of using the requiredif validator rule?
Why a client should be multithreading? Explain.
What is the difference between ear, jar and war file?
What is the RMI and Socket?
Which container method is used to cause a container to be laid out and redisplayed?
Can I map more than one table in a cmp?
In RMI, inorder to sent the stub reference to the client, is we have to load the server object first into the memory or can we directly sent reference to the client?
What are the benefits of detached objects?
What is a tasks priority and how is it used in scheduling?
Why doesn’t the focus feature on the tag work in every circumstance?
Why use a datasource when you can directly specify a connection details?
What is re-entrant. Is session beans reentrant. Is entity beans reentrant?
What does module-relative mean?