WebReference.com - Part 1 of chapter 5 from Beginning Java 2 SDK
1.4 Edition, Wrox Press Ltd (1/8) Beginning Java 2 SDK 1.4
Edition What is a Class? As you saw in Chapter 1, a class is a
prescription for a particular kind of object--it defines a new
type. We can use the class definition to create objects of that
class type, that is, to create objects that incorporate all the
components specified as belonging to that class. In case that's
too abstract, look back to the last chapter, where we used the
Stringclass. This is a comprehensive definition for a string
object, with all the operations you are likely to need built in.
This makes Stringobjects indispensable and string handling
within a program easy. String class lies towards one end of a
spectrum in terms of complexity in a class. String class is
intended to be usable in any program. It includes facilities and
capabilities for operating on String objects to cover virtually
all circumstances in which you are likely to use strings. In
most cases your own cl