2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

How to convert a Map to List in Java?

What is the best way to convert a Map<key,value> to a List<value>? Just iterate over all values and insert them in a list or am I overlooking something?
userimage
List<Value> list = new ArrayList<Value>(map.values());

by assuming that:

Map<Key,Value> map;
Answer is