Java Reference
In-Depth Information
7.2. Types and Literals
Every expression has a type that determines what values the expression
can produce. The type of an expression is determined by the types of
values and variables used within that expression. Types are divided into
the primitive types and the reference types.
The primitive data types are:
either true or false
boolean
16-bit Unicode UTF -16 code unit (unsigned)
char
8-bit signed two's-complement integer
byte
16-bit signed two's-complement integer
short
32-bit signed two's-complement integer
int
64-bit signed two's-complement integer
long
32-bit IEEE 754 floating-point number
float
64-bit IEEE 754 floating-point number
double
Each primitive data type has a corresponding class type in the java.lang
package. These wrapper classes Boolean , Character , Byte , Short , Integer ,
 
Search WWH ::




Custom Search