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 a variable declaration?
What is the purpose class.forname method?
What is complexity and its types?
What is nested loop? What is dangling else condition in it?
When is the finalize() called?
What are the 6 functions?
What classes of exceptions may be caught by a catch clause in java programming?
What is string substring?
What is a nested class?
What is math floor in java?
Can we split string with in java?
What are the advantages of java?
How you can force the garbage collection?
What are the different ways to handle exceptions?
How do you execute a thread in java?