According to wikipedia, a (primitive) wrapper class in Java is one of those eight classes that wrap a (=one) primitive value. String
wraps a char[]
so according to this it is not a (primitive) wrapper class.
Furthermore, String
is not designed to wrap or decorate a character array. String
has been designed to model a string, a character sequence and the current implementation uses an internal char[]
. But Sun could also have chosen to use a byte[]
a long with a character encoding hint, a collection or something native. That doesn't matter.
That's different for the primitive wrappers: they have been designed only to wrap a primitive, to adapt a java primitive to java.lang.Object
.