Class A{
}
ClassB extends A{
}
Class Main {
public static void main(String s[])[
A a=new B();
//Here a is a reference variable
}On Wed, Dec 23, 2009 at 8:46 PM, Shashank Malhotra <[email protected]>wrote: > I came across the following line: > A reference variable of a superclass can be assigned a reference to > any subclass derived from that superclass. > what does that mean?? > What is a reference variable?? > > -- > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected]<javaprogrammingwithpassion%[email protected]> > For more options, visit this group at > http://groups.google.com/group/javaprogrammingwithpassion?hl=en -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en
