Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Var with Style - Local Variable Type Inference in Java 10

Devoxx via YouTube

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This session explains Java 10 local variable type inference and style guidelines for using `var` to keep code concise and readable. Examples show effective uses and cases where `var` can make code harder to understand.

Syllabus

Intro
What is type inference
Where can var be used
Reassignment
Examples
Controversy
When to not use var
Principles
Strawman example
Try with Resources example
Try with Providers example
Generics example
Programming to the interface
Context
Example Code
Sample Code
Summary

Taught by

Devoxx

Reviews

Start your review of Var with Style - Local Variable Type Inference in Java 10

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.