Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

is it possible to add a object in a HASHMAP

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to perform selection sort in java?

1044


What are the states of thread in java?

1033


What is the hashcode () and equals () used for?

1124


What is class forname?

1093


Which access specifier can be used with class ?

1046


What is the scope or life time of instance variables?

1162


Can you pass by reference in java?

1034


What are keyboard events?

1207


What is the difference between private & public & friendly classes?

1112


What are the major advantages of internal iteration over external iteration?

1106


Tell me the latest versions in java related areas?

1136


What is a parameter example?

1029


What is role of void keyword in declaring functions?

1096


What are the six ways to use this keyword?

1112


how to create constants in java?

1126