February 2014
Beginner
1248 pages
62h 25m
English
• Types in Java are divided into two categories—primitive types and reference types. The primitive types are boolean, byte, char, short, int, long, float and double. All other types are reference types, so classes, which specify the types of objects, are reference types.
• A primitive-type variable can store exactly one value of its declared type at a time.
• Primitive-type instance variables are initialized by default. Variables of types byte, char, short, int, long, float and double are initialized to 0. Variables of type boolean are initialized to false.
• Reference-type variables (called references; p. 81) store the location of an object in the computer’s memory. Such variables refer to objects ...
Read now
Unlock full access