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 type of questions asked for barclays technologies pune please send urgent

0 Answers  


What is meant by JVM? Is JVM platform independent or not?

0 Answers   Wipro,


What isan abstract class and when do you use it?

1 Answers   Genpact,


How do you add spaces in java?

0 Answers  


Relationship between an event-listener interface and an event-adapter class?

1 Answers  






How do you make an arraylist empty in java?

0 Answers  


Can we print null in java?

0 Answers  


how we can write the string concatenation program in java.

3 Answers  


what r advatages of websphere? & how to deploy?

0 Answers   Saksoft,


Is an empty arraylist null?

0 Answers  


How do you escape in java?

0 Answers  


Why vector class is used?

0 Answers  


Categories