Introduction
Once written, a code block is definitely read more than it’s modified. Given this fact, it’s important to leave it as readable as it can be for future readers. Therefore, the Java team introduced a new feature called “Local Variable Type Inference” in Java 10 to help the developers further with this fact.
The feature is introduced with JEP 286. Let’s take a look at the excerpt from the goal section of the JEP.
Continue reading “Java Local Variable Type Inference”Goals
JEP 286: Local-Variable Type Inference
We seek to improve the developer experience by reducing the ceremony associated with writing Java code, while maintaining Java’s commitment to static type safety, by allowing developers to elide the often-unnecessary manifest declaration of local variable types