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

how copy the hashmap object into arraylist at java program?

Answer Posted / abhinaw

HashMap hm = new HashMap();
hm.put("1", "a1");
hm.put("2", "a2");
hm.put("3", "a3");
hm.put("4", "a4");
hm.put("5", "a5");

ArrayList list = new ArrayList();
list.addAll(hm.entrySet());
System.out.println(list);

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to create multithreaded program? Explain different ways of using thread? : Java thread

999


What is jdbc api?

1010


Is alive in java?

955


What is the difference between throw and throws keywords?

1054


What is complexity and its types?

1033


What is pangram in java?

1014


What are multiple inheritances? Is it supported by java?

952


What is the exception hierarchy in java?

964


What is a constructor, constructor overloading in java?

1002


What is the basic concepts of OOPS?

1204


Is char a method in java?

1072


Explain java coding standards for interfaces?

1119


What are the access modifiers available in java?

1132


What is the disadvantage of synchronization?

1017


What is a get method?

1057