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 does I ++ mean?
Is nullpointerexception checked or unchecked?
What is nested top-level class?
Write a java program to print fibonacci series?
What is indexof?
Difference between arraylist and hashset in java?
What is the purpose of void?
What will be the initial value of an object reference which is defined as an instance variable?
what is meta-Inf?
What all access modifiers are allowed for top class ?
What is casting?
Is null in java?