| Bruce Eckel's Thinking in Java | Contents | Prev | Next |
data types: class
class DataOnly {
int i;
float f;
boolean b;
}d.i = 47; d.f = 1.1f; d.b = false;
|
Primitive
type
|
Default
|
|---|---|
|
Boolean
|
false
|
|
Char
|
‘\u0000’
(
null)
|
|
byte
|
(byte)0
|
|
short
|
(short)0
|
|
int
|
0
|
|
long
|
0L
|
|
float
|
0.0f
|
|
double
|
0.0d
|