Tag: Java 10 features
-
Java 10 – local variable type inference
In Java 10, a new feature called local variable type inference was introduced. This feature allows developers to declare local variables without specifying the type explicitly. Instead, the compiler infers the type of the variable based on the initialization expression. Here is an example of how local variable type inference works: “`var message = “Hello,…