What is polymorphic method in java?
问题 I'm studying java language for SCJP test. It is little bit hard to understand "polymorphic method". Could you explain it for me? or give me some links? 回答1: "Polymorphic" means "many shapes." In Java, you can have a superclass with subclasses that do different things, using the same name. The traditional example is superclass Shape , with subclasses Circle , Square , and Rectangle , and method area() . So, for example // note code is abbreviated, this is just for explanation class Shape {