public class A { int x; int y; A() { x = 1; y = 1; } A(int x) { this.x = x; this.y+=1; } } class B extends A { B(int x) { this.y += this.x + x; } }