I am not quite sure abut the reason,but as far as I concerned,here print method is overloaded not overriden because they have different argument list.As the method are overloaded,when you calling through the reference of super class,no hidding of methods occurs and they invoking the methods of super class.When invoking methods,references of SuperBase class is used. That's why the out put is:
Super Super Base [ October 24, 2007: Message edited by: Saurabh Verma ]
Joined: Oct 24, 2007
Ah that makes sense! You're right, it's about overloading - my mistake.
Checking the S&B book: "Reference type determines which overlaoded method will be used at compile time". -> at compile time, the only known print method is the one from SuperBase. Even if the real object that is referenced by b1 has a more accurate overlaoded method, it's the one visible at compile time that is used.
subject: (Solved!) Inheritance, polymorphism and overriding.