is it possible to add a object in a HASHMAP

Answers were Sorted based on User's Feedback



is it possible to add a object in a HASHMAP..

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

is it possible to add a object in a HASHMAP..

Answer / siva thimmannagari

i think its possible

Is This Answer Correct ?    11 Yes 0 No

is it possible to add a object in a HASHMAP..

Answer / raguraman

yes it is posible

Is This Answer Correct ?    7 Yes 0 No

is it possible to add a object in a HASHMAP..

Answer / ravikiran

Yes we can add Object as a value inside HashMap

Is This Answer Correct ?    4 Yes 0 No

is it possible to add a object in a HASHMAP..

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

is it possible to add a object in a HASHMAP..

Answer / neo

Yes, its mainly used for it in real development

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Core Java Interview Questions

difference between java ,c#&java,c++

3 Answers  


Difference between method overloading and overriding.

0 Answers  


Define an enumeration?

0 Answers  


What is the different between get and post?

0 Answers  


How to create an interface?

0 Answers  






What is ellipsis in java?

0 Answers  


What is the difference between compile-time polymorphism and runtime polymorphism?

0 Answers  


What is static data type in java?

0 Answers  


What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?

0 Answers  


How destructors are defined in java?

0 Answers  


Name four container classes.

0 Answers  


What are the differences between this and super keyword?

0 Answers  


Categories