Question: a ) new Pet myPet = Pet ( ) ; b ) Pet myPet = new Pet ( Cat ) ; c )
a new Pet myPet Pet;
b Pet myPet new PetCat;
c new Pet myPet Pet;
d Pet myPet new Pet;
e Pet yourPet new PetCat;
f String yourPet new Pet "Dog";
g new yourPet PetDog;
h none of these
i Pet myPet new PetDog;
j Pet yourPet new Pet "Cat";
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
