Map<Integer, String> map = new HashMap<>();
map.put(1, "B");
map.put(2, "C");
map.put(3, "D");
map.put(4, "A");
List<String> list = map.values()
.stream()
.sorted()
.collect(Collectors.toList());
Output: [A, B, C, D]