public class Test {
class A {
private void act(){};
}
class B extends A {
protected void act(){};
}
class C extends B {
public void act(){};
}
class D extends B {
void act(){};
}
public static void main(String[] args){
A obj = new Test().new D();
obj.act();
}
}
Login in to like
Login in to comment