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 are the differences between this and super keyword?

925


Can interface be private in java?

993


What is meant by 'Class access modifiers'?

1026


How does list work in java?

898


Can we increase array size dynamically in java?

927


What is a map in java?

967


Can a final variable be manipulated in java?

961


What are abstract classes and anonymous classes?

1061


What is the difference between import java.util.date and java .util?

1037


What are the different types of constructor?

970


What is assembly used for?

1003


How can we find the sum of two linked lists using stack in java?

1116


What is the difference between && and & in java?

1057


What is the Concept of Encapsulation in OOPS

978


How to do encapsulation in java?

1038