Java10

2 posts in this section

Java 11 Overview: The Road from Java 8 Through Java 9, 10, to LTS

Why Java 11 Matters Java 8 was released in March 2014. It dominated enterprise Java for nearly a decade, but it misses a decade’s worth of language improvements, API modernisation, JVM advances, and security hardening. Java 11 (September 2018) is the first Long-Term Support release after Java 8, and it packages three releases of evolution into a single supported baseline. For most teams the question is not whether to upgrade, but how.

Continue reading »

var Keyword (JEP 286, 323): Local Variable Type Inference

What var Does var is a reserved type name (not a keyword) introduced in Java 10 (JEP 286). It instructs the compiler to infer the type of a local variable from its initialiser. The inferred type is fixed at compile time — var does not make Java dynamically typed. // Before var ArrayList<String> names = new ArrayList<String>(); Map<String, List<Integer>> scores = new HashMap<String, List<Integer>>(); // With var var names = new ArrayList<String>(); var scores = new HashMap<String, List<Integer>>(); After compilation, both forms produce identical bytecode.

Continue reading »