how copy the hashmap object into arraylist at java program?

Answer Posted / fellow java novice

/* HashMap hm; assume hash map has array list objects in it


ArrayList al = (ArrayList) hm.get("name by which arraylist
sits in the hashmap");

/* the crux of the matter is the user of 'get' to access
from hashmap

Is This Answer Correct ?    0 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two parts of a conditional statement?

518


Can we extend singleton class?

535


Explain purpose of sleep() method in java?

622


What is public static void main?

572


What is fundamental datatype?

531






What technique can be employed to compare two strings?

578


What is constructor chaining and how is it achieved in java?

575


What is difference between path and classpath in java?

487


What language is java written?

542


What is set string?

599


Which sort is best in java?

536


What are the different types of data structures in java?

496


Can we have multiple public classes in a java source file?

560


How hashmap increases its size in java?

495


What is the difference between size and length in java?

519