0
java polymorphism pls inspect the vode
public class Test { public void m(){ System.out.println("super"); } } class V extends Test{ @Override public void m(){ System.out.println("subc"); } public static void main(String[] args){ Test t=new V(); t.m(); } }
2 odpowiedzi
0
ok i got you thanks looks like i was the ome that thinks of limits the limit.. bcus i saw a similar question with the arraylist which implement list interface when creating object with it the reference provided is that of the list so i didn't get it and i also read about it extending or implementing Serialization? Donna
0
then Donna what is the difference between the super class reference and subclass reference it that where my mistake is.