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