All > Technology > Programming > Java
The ability of an object reference to be used as if it referred to an object with different forms. Polymorphism in Java results from both class inheritance and interface inheritance. The apparently different forms often result from the static type of the variable in which the reference is stored. Given the following class header
class Rectangle extends Polygon implements Comparable
an object whose dynamic type is Rectangle can behave as all of the following types: Rectangle, Polygon, Comparable, Object.- Browse Related Terms: aliases, functional programming, imperative programming, null reference, object reference, polymorphism, reference, static type, variable declaration
Also listed in: