// Trace1 Example. // Draw the reference diagram, trace the instance // variable changes and predict the output. public class Main1 { public static void main(String[ ] args) { A a1 = new A( ); A a2 = new A(10, 11); B b1 = new B(20, 21); a1.f(0); a2.f(1); b1.f(2); System.out.println(a1); System.out.println(a2); System.out.println(b1); } } // Output: 11x3 18x11 28x23x3