The types of the Java programming language are divided into two categories: primitive types and reference types. The primitive types (�4.2) are the boolean type and the numeric types. The numeric types are the integral types byte, short, int, long, and char, and the floating-point types float and double. The reference types (�4.3) are class types, interface types, and array types. There is also a special null type.
4.1 The Kinds of Types and Values
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).
There is also a special null type, the type of the expression null, which has no name. Because the null type has no name, it is impossible to declare a variable of the null type or to cast to the null type. The null reference is the only possible value of an expression of null type
toString() is being called on a null object and calling a method on null object will throw NPE.