polymorphism without virtual methods
According to book SCJP Sun Certified Programmer for Java 6 Study Guide, "all java objects are polimorphic".
class B {}
class A 开发者_运维知识库extends B {}
Class A doesn't have any overriden methods. Is it polymorphic ?
Definitely, because class B extends Object and Object has a few methods already.
By default every object inherits from Object so overall the answer is yes
精彩评论