Can we pass a reference of subclass to a method which has parameter of superclass type.
Yes. In fact it is generally good to use a more abstract class or even an interface which is more abstract as parameters because this makes your method more general.
Kaydell
I can't take it! You are too smart for me! Here is the tiny ad:
a bit of art, as a gift, that will fit in a stocking