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 |
Define a package.
How to check if linked list contains loop in java?
in a console we r giving java <class name> if r pressing enter where it'll goes
Can we restart a dead thread in java?
what is difference between global methods and local methods?
Why convert an applet to an application?
What are white spaces in java?
Is void a return type?
How can you make sure that your singleton class will always return single instance in multi-threaded environment?
Does java arraylist maintain insertion order?
Which is fastest collection in java?
What do you know about the garbage collector?