In java, does polymorphism only stands for a child object being referred by a parent reference?
for example: if cat & dog extends Animal,
Animal a = new Dog(); //polymorphism happens here
Animal b = new Cat(); //here too.
Is this the only kind of polymorphism in java? (whether the usage is in collections or simply as in the example).
This may be a novice question, but i am hoping, there is more to this scene & experienced minds can share their thoughts. Thanks.