created: 11/13/98; revised: 09/12/99, 06/13/00, 07/27/02, 08/18/03, 01/19/06
CHAPTER 30 — Defining Your Own Classes
The previous chapters have discussed how to use objects and their methods. The objects were constructed using classes from the Java libraries. This chapter discusses how to define your own classes and construct objects using them.
Chapter Topics:
- Object Oriented Programming
- Syntax of Class Definitions
- Syntax of Method Definitions
- The
returnstatement - The
voidreturn type - Object Oriented "Hello World" example
- Classes for Testing
QUESTION 1:
(Review:) what is the difference between a class and an object?