package tutorial.base;
public class TypesTutorial {
public static void main(String... args) {
A alpha = new B(0);
}
}
class A {
A(int x){ // - 1 -
a(x); // - 2 -
}
void a(int x) {
System.out.println("A-a: " + x);
}
}
class B extends A {
B(int x) { // - 3 -
a(x); // - 4 -
}
void a(int x) {
System.out.println("B-a: " + x);
}
}
Login in to like
Login in to comment