Var with Style: Local Variable Type Inference in Java

27 Nov 2018

5:00 pm



This is a virtual Meetup occuring at 5PM UK time (BST), here’s a timezone calculator (

You can tune in to the live session at (

Join us for live, in-session discussion on our slack space:


Java 10 introduced a feature called Local Variable Type Inference, which lets programmers declare local variables using ‘var’ instead of using an explicit type. This feature enables one to write code that is more concise and more readable. However, it’s also possible for this feature to be misused, obfuscating code instead of making it more readable. The JDK team has published a set of style guidelines that help direct programmers toward uses of ‘var’ that improve code quality and that help them avoid uses that detract from code quality. This session gives an overview of the new ‘var’ feature and describes these style rules. The presentation is liberally supplemented with code examples of both good uses and misuses of ‘var’.

Speaker: Stuart Marks

Stuart Marks is a Consulting Member of Technical Staff in the Java Platform Group at Oracle. He is currently working on a variety of JDK core libraries projects, including Collections, Lambda, and Streams, as well as improving test quality and performance. As his alter ego “Dr Deprecator” he also works on the Java SE deprecation mechanism. He has previously worked on JavaFX and Java ME at Sun Microsystems. He has over 25 years of software platform product development experience in the areas of window systems, interactive graphics, and mobile and embedded systems. Stuart holds a Master’s degree in Computer Science and a Bachelor’s degree in Electrical Engineering from Stanford University.

Leave a comment

You should login with GitHub to comment

Be updated, subscribe to our signals

Inviting for a beer
See you there!

Thank you for RSVPing. Please, keep culture high and remove RSVP once you now you can not make it.

Well done!

Your commit was pushed to GitOrbit, let`s see what other guys think about it.


Something wrong...

You already like this article!

Please authorize!

sign in