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

What is the difference between serial and throughput garbage collector?

0 Answers  


What is are packages?

0 Answers  


What is the difference between public, private, protected, and friend access?

0 Answers   Amazon,


what is the Yield() method used in threads?

4 Answers   Accenture,


How do you check if an arraylist is not empty?

0 Answers  


What is difference in between java class and bean?

0 Answers  


GoldMansachs Interview process....

1 Answers   Goldman Sachs,


Difference between current previous versions of Java?

0 Answers   Atos Origin,


How do you use final keywords and final variables in Java?

2 Answers  


Why are generics used?

0 Answers  


What is java algorithm?

0 Answers  


WHAT IS MARKER INTERFACE,AND NO METHODS IS NOT THERE ON THAT INTERFACE THEN WHY WE USED IN JAVA?

3 Answers   L&T,


Categories