http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
Type
|
Explanation
|
Default Value,
Minimum, Maximum
|
Example
|
||
byte
|
A 8-bit (1-byte)
integer value
|
0
|
-127
|
127
|
byte b = 1;
|
short
|
A 16-bit (2-byte)
integer value
|
0
|
-32,768
|
32,767
|
short s = 10;
|
int
|
A 32-bit (4-byte)
integer value
|
0
|
-2,147,483,648
|
2,147,483,647
|
int i = 32;
|
long
|
An 64-bit (8-byte)
integer value
|
0L
|
-263
|
263-1
|
long l = 100L;
|
float
|
A 32-bit (4-byte)
floating-point value
|
0.0f
|
|
|
float f = 150.5f ;
|
double
|
A 64-bit (8-byte)
floating-point value
|
0.0d
|
|
|
double d = 155.5d;
|
boolean
|
A true or false value
|
false
|
|
|
|
char
|
A 16-bit character
using the Unicode encoding scheme
|
‘\u000’
|
|
|
|