Polymorphism is not as vital as inheritance. That is, without polymorphism, you still CAN make a Java program; however without inheritance, especially when using Java library code, you CANNOT achieve very much.
Apple apple = (Apple) fruit; System.out.print(apple.getTaste());
instanceof Operation (3) CB: OK. It seems to me that I know them all, but I want to ask you, Smart Rabbit, whether the 3rd year students in NPIC who are watching us understand it or not. SR: This is a hard question. I’m not sure either. You’ve better ask them by yourself.