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 |
difference between java ,c#&java,c++
Difference between method overloading and overriding.
Define an enumeration?
What is the different between get and post?
How to create an interface?
What is ellipsis in java?
What is the difference between compile-time polymorphism and runtime polymorphism?
What is static data type in java?
What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?
How destructors are defined in java?
Name four container classes.
What are the differences between this and super keyword?