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

What is the syntax and characteristics of a lambda expression? Explain

1091


What are the advantages of exception handling?

1115


What does yield method of the thread class do?

1080


How does queue work in java?

1022


What is the difference between overriding & overloading?

1135


Java is pass by value or pass by reference? Explain

1028


What is variable declaration and definition?

1060


What is the significance of java packages?

1140


Who developed java?

1055


How can we pass argument to a function by reference instead of pass by value?

1156


What is the implementation of destroy method in java. Is it native or java code?

1019


Explain java coding standards for variables ?

1220


What is hash in java?

1037


Which one of the following suits the description of a string better: derived or primitive?

1009


Can memory leak in java?

1084