class B { int x; B () { this(5); } B (int x) { this.x = x; } int getx () { return this.x; } } class Instance1 { public static void main (String[] args) { B x = new B(3); B y = new B(); B z = new B(); System.out.println("x.getx() = " + x.getx()); System.out.println("y.getx() = " + y.getx()); System.out.println("z.getx() = " + z.getx()); x.x = 42; y.x = 17; System.out.println("After assignments ..."); System.out.println("x.getx() = " + x.getx()); System.out.println("y.getx() = " + y.getx()); System.out.println("z.getx() = " + z.getx()); } }