void (String[] args) { // Breakpoint! final List<Integer> result = Stream .of(1, 2, 3, 4, 5, 6).map(x -> x * x).collect(Collectors.toList()) .stream().filter(x -> x % 2 == 0).collect(Collectors.toList()) .stream().sorted().collect(Collectors.toList()) .stream().distinct().collect(Collectors.toList()); }