Skip to main content

more options

There are two variables, p and q, initially containing null.

ghj

After execution of these assignments:

p= new Animal();
q=
new Patient();
p=
new Animal();

the variables and created objects look like this:

          ghj