The Class Body

The class body contains all of the code that provides for the life cycle of the objects created from it:

1. constructors for initializing new objects,

2. declarations for the variables that provide the state of the class and its objects,

3. methods to implement the behavior of the class and its objects,

4. And a finalize method to provide for cleaning up an object after it has done its job.

Variables and methods collectively are called members.
Constructors are not methods. Nor are they members.

Scroll to Top