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

How will you get the platform dependent values like line separator, path separator, etc., ?

0 Answers  


When is the garbage collection used in Java?

0 Answers   BirlaSoft,


What is a prefix function.write down a code to compute prefix function.

0 Answers  


What is javac used for?

0 Answers  


What is hash in java?

0 Answers  


What is the difference between access specifiers and access modifiers in java? 16

0 Answers  


Define a java class.

1 Answers  


What is the Scope of Static Variable?

0 Answers   Verifone,


What are the default and parameterized constructors?

0 Answers  


What is final method in java?

0 Answers  


explain the concept of virtual method invocation in polymorphism in detail?

0 Answers   TCS,


Is there is any error if you have multiple main methods in the same class?

10 Answers   Infosys, Wipro,


Categories