Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
No overloading is just a handy feature, it is not polymorphism. Overriding is what allows for polymorphism; this allows a base class or interface reference to behave differently at runtime depending on what derived object it actually refers to. Here's a simple example of the same reference (spot) behaving differently depending upon which object it is referring to: // PetsAgog.java class Dog implements Animal class Cat implements Animal public class PetsAgog Replies:
|
Sponsored Links
|