I was reading about the new features released in Java 10 and I found
Java 10 introduced
var
as a reserve type name to reduce verbosity. It
var
is something that is already in C#. Basically, instead of declaring a variable type, it assumes its type from what it is being set to. For instance:
var myString = "Hello world"
Because you are setting it to a value in quotes, it assumes it is a String
, rather than having to specify like:
String myString = "Hello world"