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
How can I right-justify a string?
Why string is immutable with example?
What is preflight request?
what do you understand by the term string with respect to java?
What are the advantages of packages in java?
What is flag in python?
What is a boolean field?
What is the purpose of garbage collection in java, and when is it used?
How do you trim a space in java?
what is the constructor and how many types of constructors are used in java?
Why do we create public static method in java?
What are green threads in java?
What do you mean by mnemonics?
explain different ways of using thread? : Java thread
Can we increase array size dynamically in java?