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 ctrl m character?
What’s the difference between unit, integration and functional testing?
How can we create a thread in java?
Can we assign the reference to this variable?
Can java list contain duplicates?
Is java based on c?
What are the three parts of a lambda expression?
What is a ternary operator in java? What is an interface?
What is a super method?
What is the difference between a factory and abstract factory pattern?
Q1.A. Write note on “The class path Environment Variable”? B. Which are different kinds of source code? Q2.A. How to create an interface? B. Why convert an applet to an application? Q3.A. How to use Media tracker Class. B. How to use string tokenizer class. Q4 A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on “The properties class” Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.
What do bitwise operators do?
Explain static nested classes ?
Are true and false keywords?
Can a constructor be private and how are this() and super() method used with constructor?