Primitive wrapper class in Java: Difference between revisions

Content deleted Content added
WP:CHECKWIKI error fix #26. Convert HTML to wikicode. Do general fixes and cleanup if needed. - using AWB (10242)
Chealer (talk | contribs)
m remove link on "Wrapper classes" (not discussed in object type)
Line 1:
A '''primitive - wrapper class''' in the [[Java (programming language)|Java]] and [[ActionScript]] programming languages 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]]. [[Java Platform, Standard Edition|J2SE]] 5.0 introduced [[Boxing (computer science)#Autoboxing|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.
 
The primitive wrapper classes and their corresponding primitive types are: