I know that
class A  { } 
class B extends A  { }  
class C extends B { }
is completely legal and I can
C obj = new C();
obj.anyMethodfromA();
is possible. Now question is this What if I don't want to access class A methods in class C only class B methods should be inherited. Is this possible?
C anotherObj = new C();
anotherObj.anyMethodfromA(); //can be illegal?
anotherObj.anyMethodfromB(); //should be legal.
 
     
     
     
     
    