Start of Tutorial > Start of Trail |
Search
Feedback Form |
This trail begins with a general discussion about the life cycle of objects. The information presented applies to objects of all types and includes how to create an object, how to use it, and, finally, how the system cleans up the object when it's no longer being used.
Here, you will learn how to create and use objects of any type. This section also discusses how the system cleans up the object when it's no longer needed.
Character data--either a single character or a series of characters--can be stored and manipulated by one of three classes injava.lang
:Character
,String
, andStringBuffer
.
To work with numeric data, you use the number classes. TheNumber
class is the superclass for all number classes in the Java platform. Its subclasses includeFloat
,Integer
, and so on.
An array is an important data structure in any programming language. An array is a fixed-length structure that stores multiple values of the same type. You can group values of the same type within arrays. Arrays are supported directly by the Java programming language; there is no array class. Arrays are implicit extensions of theObject
class, so you can assign an array to a variable whose type is declared asObject
.The Java platform groups its classes into functional packages. Instead of writing your own classes, you can use one provided by the platform. Most of the classes discussed in this chapter are members of the
java.lang
package. All the classes in thejava.lang
package are available to your programs automatically.
Start of Tutorial > Start of Trail |
Search
Feedback Form |