Maths encyclopedia and lessons  
Search

Mathematics Encyclopedia and Lessons

 
     
 

Lessons

Popular
Subjects

algebra
arithmetic
calculus
equations
geometry
differential equations
trigonometry
number theory
probability theory
more
 

References

applied mathematics
mathematical games
mathematicians
more
 
 

Object type

In computer science, an object type (a.k.a. wrapping object) is a datatype that is used in object-oriented programming to wrap a non-object type to make it look like an object.

Some object-oriented programming languages make a distinction between objects and non-objects, often referred to as primitive types for reasons such as runtime efficiency and syntax or semantic issues. For example, Java has object types corresponding to each primitive type: Integer and int, Character and char, Float and float, etc. Languages like C++ make little or no distinction between objects and non-objects; thus, the use of object type is of little interest.

Boxing is a way to wrap objects with primitive types over object types so that they can be used like objects. Examples are Integer class for integer type in Java. Some languages require programmers to do boxing manually, while some support autoboxing/unboxing.

01-04-2007 01:18:14
The contents of this article are licensed from Wikipedia.org
under the GNU Free Documentation License. How to see transparent copy