Answer Posted / siddpany
class hashMap
{
public static void main(String args[])
{
HashMap map = new HashMap();
map.put("key1",200);
map.put("key1",100);
map.put("key1",400);
map.put("key1",700);
Set set = map.keySet();
//for each loop
for(Object object :set)
{
System.out.println(map.get(Object));
}
| Is This Answer Correct ? | 11 Yes | 4 No |
Post New Answer View All Answers
What is string builder?
Does windows 10 need java?
Which containers use a flowlayout as their default layout in java programming?
What are wrapped classes in java programming?
What are the types of strings?
What is difference between pointer and reference?
What are synchronized methods ?
What is javac in java?
What is stack class in java?
Why local variables are stored in stack?
Define a package.
How will you initialize an Applet?
What is identifier give example?
What are the types of web technologies?
Using callable statement how can you pass out parameters, explain with example?