Sitemap
The Java Report

A curation of contemporary content on all things Java, JavaFX, JavaEE, and JVM technologies.

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

--

Press enter or click to view image in full size
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>

--

--

The Java Report
The Java Report

Published in The Java Report

A curation of contemporary content on all things Java, JavaFX, JavaEE, and JVM technologies.

Adrian D. Finlay
Adrian D. Finlay

Written by Adrian D. Finlay

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

Responses (13)