Top
Previous Next
Java Arrays, Objects, Methods CS 161 - Java

Java Objects

Classes

Definition: A class is a blueprint or prototype that defines the variables and methods common to all objects of a certain kind.
from: The Java Tutorial, Campione & Walrath, 1998



Objects - Instances of classes

Definition: An object is a software bundle of variables (fields) and related methods.
from: The Java Tutorial, Campione & Walrath, 1998

Objects instantiate classes

Objects are created (via new) from the template that a class defines.

Question: Why define classes and create object types?


Top
Previous Next
jwd