There are two kinds of types in the
Java programming language: primitive types (�4.2) and reference types (�4.3).
There are, correspondingly, two kinds of data values that can be stored in variables, passed as arguments, returned by methods, and operated on: primitive values (�4.2) and reference values (�4.3).
The primitive types are boolean, byte, short, int, long, char, float, double.
The reference types are class types, interface types and array types. Variables of these types can refer to objects of the corresponding type.
A literal is the source code representation of a value of a primitive type (�4.2), the
String type (�4.3.3), or the null type (�4.1).
Each type has literals, which are the way that constant values of that type are written.
Examples of primitive literals are true, false, 'm', '\n', 10, -10, 0xff, 077, 10L, 1.23E4. This is a literal of reference type, "abc" and this is a literal of null type, null.
(credits: JLS and The Java Programming Language)
[ October 08, 2003: Message edited by: Marlene Miller ]