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 main use of generics in java?

0 Answers  


Why do we use string?

0 Answers  


What are the six ways to use this keyword?

0 Answers  


What are meta-annotations?

0 Answers   Cyient,


How to use arraylist in java netbeans?

0 Answers  






Why should we create an object? what is a need of it? Apart from access members of a class i want what is a need of object what does it contain?? In normal class to access any member of thaht class we create object where as for static class we access its members using class name. what is a difference between them... thanks in advance.

1 Answers  


How to display names of all components in a Container?

0 Answers   Microsoft, Wipro,


They had given one progam final HashMap hm=new HashMap(); public void show() { hm.put("name",value); } in this prg here the final hashtable value can be changed in put method,its the prg run?

3 Answers   DNS, Wipro,


Why should we use java?

1 Answers   IBM,


How to obtain a performance profile of java program

0 Answers  


What is an example of a conditional statement?

0 Answers  


What is concurrent hashmap and its features?

0 Answers  


Categories