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

Can a class have multiple superclasses?

1154


What are methods?

1017


Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).

2137


What are the properties of thread?

924


What is off heap memory?

1003


What does system out println () do?

1004


In a container there are 5 components. I want to display all the component names, how will you do that?

2186


What exactly is methodology?

916


How do you declare an array that will hold more than 64KB of data?

1281


Why multiple inheritance is not supported by java?

973


What is instance synchronization?

1044


How are multiple inheritances done in Java?

1131


Can we overload the main() method?

1039


What is the use of 'super' keyword inside a constructor?

962


What is classes in java?

935