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 basic concept of java?
What is the difference between the paint() and repaint() methods in java programming?
Is a string literal?
Why Java is not pure Object Oriented language?
Which class cannot be a subclass in java?
What is the maximum size of a string in java?
Why stringbuffer is faster than string?
What is a treeset class?
What is java and why do we need it? Explain
What is use of valueof () in java?
How many arguments can be passed to main ()?
What are the advantages of functions?
What is object cloning in Java?
What will be the output of round(3.7) and ceil(3.7)?
Is array size fixed in java?