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 |
How to sort an unsorted array in java?
what do you understand by synchronization? : Java thread
Is delete, next, main, exit or null keyword in java?
What is the immediate parent class of the Applet class?
What is the difference between a method and a procedure?
Which is dependent variable?
What is a key in java?
What are abstract methods in java?
What do you understand by an io stream?
Explain the private protected method modifier?
Can you call a private data from an inner class?
What is a method type?