Hi,
I have a question from robers&heller's certification guide.
What does it mean to assign an object reference to an interface?
For eg., consider the code below.
(Class Mammal is the super class.
Class Raccon inherits from Mammal and implements Washer.
Class SwamThing inherits from Mammal but doesn't implement Washer.)
Now here is the code.
Raccon rocky;
SwampThing pogo;
Washer w;
rocky = new Raccon();
w = rocky;
pogo = w;
After "w = rocky", doesnt "w" (interface) become an object reference to "rocky" class??
What will happen at the next line "pogo = w"? Is "w" still a an interface??
Please, somebody explain. I'd appreciate it very much.
[This message has been edited by cowboy55 (edited June 25, 2000).]