The var keyword can simplify variable declarations with less verbosity while maintaining readability.
Source Code
public class VarExample {
public static void main(String[] args) {
var list = new ArrayList(); // infers ArrayList
var stream = list.stream(); // infers Stream
System.out.println(stream);
}
}