Wednesday, April 06, 2005

INTRODUCTION TO AUTOBOXING

Although the Java programming language is an object-oriented language, it's often the case that when using the language you need to work with primitive types. Before J2SE 5.0, working with primitive types required the repetitive work of converting between the primitive types and the wrapper classes. In this tip, you will see how the new autoboxing feature in J2SE 5.0 handles conversions -- for example, between values of type int and values of type Integer. The tip also discusses some autoboxing-related considerations in determining when two numerical values are equal.

No comments:

Post a Comment