A single class may have any number of instances.
As we declare variables like (type name; ), this notifies the compiler that we will use name to refer to data whose type is type .
|
Dog tuffy;If we declare reference variable (
tuffy
) like this, its value will be undetermined (null
) until an object is actually created and assigned to it.
Simply declaring a reference variable does not create an object.