u 11 Java Enhancement Proposals (JEP’s) u Aims to reduce packages size u Split the JDK in parts – Modules u More control over packages u Eliminates the “Jar Hell” u Main module (Root) is java.base u It’s Java – 100% backwards compatible 9
starting at Java 9 u Substitute Concurrent Mark Swap (CMS) – Stop the world u Smaller pause time u Memory is split in regions - 1-32MB u Goal is to have 2048 regions (Heap) 9
a variable type Cannot be a class attribute No relation with var/val from Scala/Kotlin String name = “Java”; var name = “Java”; var myMap = new HashMap(); //Map<Object, Object>() Must be initialized – var age; //Not valid var var = “var”;
(AOT) u Parallel G1 GC to improve full GC performance u AppCDS to improve start-up time u New API’s to create collections u List.copyOf(), Set.copyOf(), and Map.copyOf() u Stream API can collect data in an immutable collection u toUnmodifiableList(), toUnmodifiableSet(), and toUnmodifiableMap() 10
- Experimental u Microbenchmark Suite - based on JMH u Default CDS Archives – Enhance JDK process to generate a CDS archive u Enhance to G1. Automatically return Java heap memory to the operating system when idle 12
to know which object is null list.get(0).getName().trim(); u Where’s the null object? The list? Name? Cannot invoke "String.trim()" because the return value of "dev.graciano.Person.getName()" is null 14
to Git (GitHub) u Enhance the ZGC u Vector API u Final version of Records u Final version of Pattern Matching for instanceOf u 2nd Preview of Sealed Classes u Strongly Encapsulated JDK Internals
Experimental AOT & JIT Compiler u Vector API (2nd Incubator) u Pattern Matching for switch (Preview) u Strongly Encapsulated JDK Internals u Deprecate Security Manager for Removal u Enhanced Pseudo-Random Number Generators
Unicode { public static void main(String... args) { System.out.print(”Have a \uD83C\uDF7A"); System.out.println(" or a \uD83E\uDD64 "); } } 10/11 Slide extracted from https://speakerdeck.com/boyarsky