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
What are the differences between this and super keyword?
Can interface be private in java?
What is meant by 'Class access modifiers'?
How does list work in java?
Can we increase array size dynamically in java?
What is a map in java?
Can a final variable be manipulated in java?
What are abstract classes and anonymous classes?
What is the difference between import java.util.date and java .util?
What are the different types of constructor?
What is assembly used for?
How can we find the sum of two linked lists using stack in java?
What is the difference between && and & in java?
What is the Concept of Encapsulation in OOPS
How to do encapsulation in java?