As we have seen countless times in this book alone, when you declare a variable in Java, you have to declare the type twice, once on the left-hand and once on the right-hand side, plus a variable name:
AtomicInteger atomicInt = new AtomicInteger(42);
The problem here is that this code is verbose and repetitive. The Local-Variable Type Inference effort hopes to fix that, enabling something like this:
var atomicInt = new AtomicInteger(42);
This code is more concise, making it more readable. Notice the addition of the val keyword. Typically, the compiler knows that a line of code, for example, is a variable declaration when it sees <type> <name> = .... Since the effort would remove the need for a type on the ...