I have a Map<Integer, MyClass>
and MyClass
has 2 fields, Object1 obj
and Object2 objj
for example.
How can I create an ArrayList<Object2>
with all Object2
values?
Must I iterate the Map
and then add the values to the ArrayList
or exists another way?