@@ -0,0 +1,1581 @@
+package codesample;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.Set;%0Aimport java.util.stream.Collectors;%0A%0Apublic class NewStuff %7B%0A    public static void main(String%5B%5D args) %7B%0A%0A        /* New constructors for immutable collections */%0A        Map%3CString, String%3E immutableMap = Map.of(%22ivan%22, %22narkoman%22);%0A        Set%3CInteger%3E immutableSet = Set.of(1,2,3);%0A        List%3CInteger%3E immutableList = List.of(1,2,3);%0A%0A        /* New simplified ProcessHandle */%0A        System.out.println(%22Current process pid %22 + ProcessHandle.current().pid());%0A%0A        String allProcesses = ProcessHandle.allProcesses()%0A                .map(processHandle -%3E String.valueOf(processHandle.pid()))%0A                .collect(Collectors.joining(%22, %22));%0A        System.out.println(%22All processes pids: %22 + allProcesses);%0A%0A        /* Try-with-resources without fresh resource requirement */%0A        CustromAutoclosable autoclosable = new CustromAutoclosable();%0A        try (autoclosable) %7B%0A            // Now we can auto-close resource with try-with-resources after it was created%0A            // This allows passing autoclosable resources to other methods%0A        %7D catch (Exception e) %7B%0A            e.printStackTrace();%0A        %7D%0A%0A        /* Diamond operator on anonymous classes (Would not compile on java8*/%0A        List%3CString%3E list = new ArrayList%3C%3E()%7B%7D;%0A%0A        /* Reactive streams */%0A        %0A    %7D%0A%0A    private static class CustromAutoclosable implements AutoCloseable %7B%0A        @Override%0A        public void close() throws Exception %7B%0A%0A        %7D%0A    %7D%0A%0A%7D%0A

Add java 9 new API features