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 is the syntax and characteristics of a lambda expression? Explain
What are the advantages of exception handling?
What does yield method of the thread class do?
How does queue work in java?
What is the difference between overriding & overloading?
Java is pass by value or pass by reference? Explain
What is variable declaration and definition?
What is the significance of java packages?
Who developed java?
How can we pass argument to a function by reference instead of pass by value?
What is the implementation of destroy method in java. Is it native or java code?
Explain java coding standards for variables ?
What is hash in java?
Which one of the following suits the description of a string better: derived or primitive?
Can memory leak in java?