class A {
private static void test1() {
System.out.println("A.test1");
}
static void test2() {
test1();
}
}
public class B extends A {
void test1() {
System.out.println("B.test1");
}
static void test2() {
super.test2();
}
public static void main(String[] args) {
A a = new B(); a.test2();
}
}
Login in to like
Login in to comment