Javaa Javaa - 1 year ago 77
Java Question

How to convert a Map to List in Java?

What is the best way to convert a

to a
? Just iterate over all values and insert them in a list or am I overlooking something?

Answer Source
List<Value> list = new ArrayList<Value>(map.values());


Map<Key,Value> map;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download