Content deleted Content added
m Capitalization fix in the Unboxing article; changing this page to reflect it. |
rm link to deleted article |
||
Line 1:
{{Cleanup|date=November 2006}}
In [[computer science]], an '''object type''' (a.k.a. wrapping object) is a [[datatype]] that is used in [[object-oriented programming]] to [[wrapper pattern|wrap]] a non-object type to make it look like an [[object (computer science)|object]].
Line 6 ⟶ 5:
==Boxing==
'''Boxing''' is to place a primitive type within an object so that the primitive can be used as an object, in a language where there is a distinction between a primitive type and an object type. For example, [[List (computing)|lists]] may have certain [[Method (computer science)|methods]] which [[arrays]] might not, but the list might also require that all of its members be objects. In this case, the added functionality of the list might be unavailable to a simple list of numbers.
Line 14 ⟶ 12:
===Autoboxing===
Autoboxing is the term for treating a primitive type as an object type without any extra source code. The compiler automatically supplies the extra code needed to perform the [[type conversion]].
Line 22 ⟶ 19:
===Unboxing===
Unboxing refers to a boxed primitive type which has been broken down and the primitive type retrieved for a process of some kind such as a mathematical operation.
|