Java 10: Local Variable Type Inference

Java 10 allows you to use var as type variable instead of real type name.

Photo by Chamindu Perera on Unsplash

You can write

as

Does this mean Java support dynamic typing, no it inferences the type from the initialization. If you look at the de-compiled…