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.
When I was a kid, I used to pray every night for a new bike. Then I realized that God doesn’t work that way. So I stole a bike and asked Him to forgive me. - Emo Phillips |