bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/Java/Java Reference
Java•Java Reference

Java var Keyword

❮ Java Keywords

var

Definition and Usage

The var keyword allows a variable to be initialized without having to declare its type. The type of the variable depends on the type of the data that is being assigned to it.

The var keyword was introduced in Java 10.

Related Pages

Read more about variables in our Java Variables Tutorial .

❮ Java Keywords

Previous

Java try Keyword

Next

Java void Keyword