is it possible to add a object in a HASHMAP
Answers were Sorted based on User's Feedback
Answer / venkat
yes we can add object in Hashmap
like the example is
ArrayList list=new ArrayList();
list.add(10);
HashMap map=new HashMap();
map.put(list,"13");
here list is object
Is This Answer Correct ? | 15 Yes | 0 No |
Answer / ravikiran
Yes we can add Object as a value inside HashMap
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / janardhan
yes we can add object in Hashmap
example:--
ArrayList l=new ArrayList();
l.add(10);
HashMap map=new HashMap();
map.put(l,"13");
here l is object
Is This Answer Correct ? | 4 Yes | 0 No |
What is the difference between serial and throughput garbage collector?
What is are packages?
What is the difference between public, private, protected, and friend access?
what is the Yield() method used in threads?
How do you check if an arraylist is not empty?
What is difference in between java class and bean?
GoldMansachs Interview process....
Difference between current previous versions of Java?
How do you use final keywords and final variables in Java?
Why are generics used?
What is java algorithm?
WHAT IS MARKER INTERFACE,AND NO METHODS IS NOT THERE ON THAT INTERFACE THEN WHY WE USED IN JAVA?