Beginning with JDK 10, we can rely on the Java Local Variable Type Inference (Var Type) in order to avoid explicit typing.
Check out the following sample:
var outputStream = new ByteArrayOutputStream();
This is a shortcut for:
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();