The Java programming language is a statically typed language, which means that every variable and every expression has a type that is known at compile time.
The Java programming language is also a strongly typed language, because types limit the values that a variable (§4.12) can hold or that an expression can produce, limit the operations supported on those values, and determine the meaning of the operations. Strong static typing helps detect errors at compile time.
The types of the Java programming language are divided into two categories: primitive types and reference types. The primitive types (§4.2) are the
boolean type and the numeric types. The numeric types are the integral types