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
why java uses class level type casting ?
What are different types of inner classes ?
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)
What lambda means?
What is the difference between method and means?
Can we execute a program without main?
How do you find the absolute value?
How is hashcode calculated in java?
Explain parallel processing in java8?
What is array length?
Why can't you declare a class as protected?
What are runtime exceptions?
How to use arraylist in java netbeans?
What is a static class in java?
How many bytes are a float?