New Java 10 Language Feature: Local-Variable Type Inference (var)!

Adrian D. Finlay
The Java Report
Published in
7 min readNov 15, 2017

--

ATC2016 Innovation Lab

Per the rolling release cycle promise, JDK 10 is schedule to be released on March 20th, 2018.

Not Caught up to Java 9? Learn more below:

While it is not expected to be a major feature release, so far, it includes a feature that I find invaluable for clearing up java verbosity: Local-Variable Type Inference!

Now we can have code like this! :

var x = new HashMap<String,Integer>();
//inferred to be HashMap<String,Integer>

--

--

Adrian D. Finlay
The Java Report

@thewiprogrammer. Lover of learning, programming. Tech writer, Java aficionado. Proud mango, fishing, NBA addict! & more. Network w/ me @ bit.ly/AdfNtWk