Primitive wrapper classes are not the same thing as primitive types. Whereas variables, for example, can be declared in Java as data types double, short, int, etc., the primitive wrapper classes create instantiated objects and methods that inherit but hide the primitive data types, not like variables that are assigned the data type values.5
Therefore, the term Primitive wrapper class does not mean that wrapper classes are primitive types. It should be understood to be a class that wraps primitive types. Wrapper classes can be used to store the same value as of a primitive type variable but the instances/objects of wrapper classes themselves are Non-Primitive. We cannot say that Wrapper classes themselves are Primitive types. They just wrap the primitive types.
The Byte, Short, Integer, Long, Float, and Double wrapper classes are all subclasses of the Number class.
The wrapper classes BigDecimal and BigInteger are not one of the primitive wrapper classes but are immutable.6 7
With Java 5.0, additional wrapper classes were introduced in the java.util.concurrent.atomic package. These classes are mutable and cannot be used as a replacement for the regular wrapper classes. Instead, they provide atomic operations for addition, increment and assignment.
The atomic wrapper classes and their corresponding types are:
The AtomicInteger and AtomicLong classes are subclasses of the Number class. The AtomicReference class accepts the type parameter V that specifies the type of the object reference. (See "Generics in Java" for a description of type parameters in Java). V
S. J. Chapman, Introduction to Java, Prentice Hall, 1999. ↩
J. Murach, Murach's Java Programming, 4th Edition, Mike Murach and Associates, Inc., 2011. ↩
J. R. Hubbard, Programming with Java, Schaum's Outline Series/McGraw Hill, 1998. ↩
David O'Meara (April 2003). "Mutable and Immutable Objects: Which classes are Immutable?". Java Ranch. Retrieved 2012-05-14. The classes java.math.BigInteger and BigDecimal are not immutable either, although maybe they should have been. http://www.javaranch.com/journal/2003/04/immutable.htm ↩
Oracle. "Java documentation from oracle". Immutable arbitrary-precision integers. http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html ↩