I'm now learning java inheritance and I have a problem: if there're two classes:
public class A{
//code of class A
}
public class B extends A{
//code of class B
//code in B rewrite some methods in A
}
and, if I want to use those classes and create a 'B' object in my client program. Are there any difference between
A objectName = new B();
and
B objectName = new B();
?
Thanks.