java 8 sort list object code example
Example: java stream order by property
List<String> sorted = original.stream().sorted((o1,o2)-> o1.compareTo(o2)).collect(Collectors.toList());
List<String> sorted = original.stream().sorted((o1,o2)-> o1.compareTo(o2)).collect(Collectors.toList());