class a{
void display(){
System.out.println("display1");
}
}
class b extends a{
void display(){
System.out.println("display1b");
}
}
class c extends b{
void display(){
System.out.println("display1c");
}
}
class ab {
public static void main(String args[]){
a mn=new c();
mn.display();
}
}
it's example of late binding,but when i compile this code and then decompile using cavaj i found this code ab.java:
class ab {
ab(){}
public static void main(String args[]){
c c1 = new c();
c1.display();
}
}
If it's late binding then compiler not must should know that display() method is from c class ,
but here it's know because it replace
a mn=new c();
with
c c1 = new c();
,so this is early binding??