var

A reserved type name that asks the compiler to infer a local variable's type.

What is var in Java?

var — A reserved type name that asks the compiler to infer a local variable's type.

class City {
    void normalizeName() {
        var name = "Denver";
        var uppercaseName = name.toUpperCase();
    }
}

Level: Apprentice · More Java terms at this level

Updated

In other subjects