Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Flow of execution in case of Inheritance.....  RSS feed

 
Kshz Rn
Greenhorn
Posts: 5
  • 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: 5
  • 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
Boost this thread!