Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Flow of execution in case of Inheritance.....

 
Kshz Rn
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
abstract class A
{ abstract public void show();
public void test(){System.out.println("A");}
}
abstract class B extends A
{
public void display(){show();}
}
class C extends B
{
public void show(){System.out.println("C");}
}
class Test
{
public static void main(String S[])
{
B ob=new C();
ob.display();
}
}
 
Kshz Rn
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone tells me the flow of execution of above code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic