This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Reference type restricts you from calling some methods, that is actually in given object.
run this code, you will get what it wants to say:
[EDIT: I had forget to write extends Super in BaseClass declaration as shown by Pawel.]
Joined: Nov 14, 2008
Hmm, you must have forgot "extends Super " on BaseClass declaration.
Still, what you've said just proves my doubts - show method is not allowed to be used because of actual BaseClass object that is referenced by Super.
Im starting to think that im confusing compile and runtime... may it be the reason?