You are on page 1of 1

To sort hashmap Treemap or LinkedHashmap will be used (hashmap-set<Entry>-List-

LinkedHashmap)
To sort set Treeset or list will be used
List<String> mergedList = new ArrayList<>(list1);
mergedList.addAll(list2);
list.forEach(System.out::print);

You might also like