Picture of Two Objects and Two Reference Variables

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   go to next page        

Answer:

The program will print:

The Gingham Dog
The Calico Cat
The Gingham Dog

Picture of Two Objects and Two Reference Variables

Here is a picture of the two objects and of the two reference variables. Each arrow represents a reference.


 

QUESTION 15:

(Dumb question, but answer it anyway:) How many objects are there in this picture? How many reference variables are there in this picture?