class A { static int s = 5; int v; A(int v){ this.v = v; s += v; } void act() { v += 1; s += 2; }}class B extends A { static int s = 10; int w; B(int v, int w){ super(v+1); this.w = w; s+=w; A.s += 1; } void act() { v+=2; w+=2; s+=3; A.s += 1; } void swap(B other){ int temp = this.w; this.w = other.v; ..