Primitive wrapper class in Java: Difference between revisions

Content deleted Content added
hmm, people might think we're talking about the Indonesian island, thinking that "primitive" means stone-age tribes
m unparenthesize (programming language)
Line 1:
A '''primitive wrapper class''' in the [[Java (programming language)|Java programming language]] is one of eight classes provided in the {{Javadoc:SE|package=java.lang|java/lang}} [[Java package|package]] to provide [[object-oriented programming|object]] [[Method (computer science)|methods]] for the eight [[primitive type]]s. All of the primitive wrapper classes in Java are [[immutable object|immutable]]. [[J2SE]] 5.0 introduced [[autoboxing]] of primitive types into their wrapper object, and automatic unboxing of the wrapper objects into their primitive value—the implicit conversion between the wrapper objects and primitive values.
 
[[object type|Wrapper classes]] are used to represent primitive values when an {{Javadoc:SE|java/lang|Object}} is required. The wrapper classes are used extensively with {{Javadoc:SE|java/util|Collection}} classes in the {{Javadoc:SE|package=java.util|java/util}} package and with the classes in the {{Javadoc:SE|package=java.lang.reflect|java/lang/reflect}} [[Reflection (computer science)|reflection]] package.