A primitive can be one of eight types: char, boolean, byte,
short, int, long, double, or float. Once a primitive has been declared, its
primitive type can never change, although in most cases its value can change.

Reference variables
A reference variable is used to refer to (or access) an
object. A reference variable is declared to be of a specific type and that type
can never be changed. A reference variable can be used to refer to any object
of the declared type, or of a subtype of the declared type (a compatible type).

No comments:

Post a Comment