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 difference between jdk, jre, and jvm?
What is an immutable class?
What is a nested structure?
Is the milky way in a void?
What are the rules for variable declaration?
What is the use of singleton class?
What is meant by null and void?
Why is stringbuffer thread safe?
What is the function of character?
What is meant by vector class, dictionary class, hash table class, and property class?
What is flag in python?
How do you represent a space in regex java?
What is a pointer and does java support pointers?
What is an arraylist in java?
What are different access specifiers in java? Explain