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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you sort a list in java?

1070


Explain importance of finally block in java?

1081


what do you mean by marker interface in java?

1020


Where is the find and replace?

1056


Should a main method be compulsorily declared in all java classes?

1128


What is the default value of float and double datatype in java?

1042


Why java is used everywhere?

1055


What are different exception types exceptions available in java ?

1049


How do you use substring in java?

1194


Explain the difference between comparator and comparable in java?

1022


What is the requirement of thread in java?

1101


What is unicode used for?

1238


What is an array length?

955


What is variable argument in java?

1066


Explain the selection sort algorithm and state its time complexity?

1067