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

hashMap.keySet().toArray(); // returns an array of keys
hashMap.values().toArray(); // returns an array of values

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I right-justify a string?

1163


Why string is immutable with example?

960


What is preflight request?

1010


what do you understand by the term string with respect to java?

1032


What are the advantages of packages in java?

1587


What is flag in python?

1027


What is a boolean field?

952


What is the purpose of garbage collection in java, and when is it used?

1033


How do you trim a space in java?

975


what is the constructor and how many types of constructors are used in java?

995


Why do we create public static method in java?

1101


What are green threads in java?

997


What do you mean by mnemonics?

1046


explain different ways of using thread? : Java thread

1004


Can we increase array size dynamically in java?

939