// thought exercise: can you explain the output? class Test { int x; int y = x; Test(int x) { this.x = x; } void print() { System.out.println("IV x: " + this.x); System.out.println("IV y: " + y); } } public class iv { public static void main(String[] args) { Test t = new Test(1); t.print(); t.x=2; t.print(); t.y=3; t.print(); } } /* output: IV x: 1 IV y: 0 IV x: 2 IV y: 0 IV x: 2 IV y: 3 */