1 public class FieldSubclassTest extends FieldTest { 2 public static void main(String[] args) { 3 if (FieldSubclassTest.h != null && FieldSubclassTest.h.a == 789) { 4 System.out.println("FieldSubclassTest.h.a correct: " + FieldSubclassTest.h.a); 5 } else { 6 System.out.println("FieldSubclassTest.h.a failed!"); 7 } 8 FieldSubclassTest test = new FieldSubclassTest(); 9 if (test.h != null && test.h.a == 789) { 10 System.out.println("test.h.a correct: " + test.h.a); 11 } else { 12 System.out.println("test.h.a failed!"); 13 } 14 if (test.e != null && test.e.a == 456) { 15 System.out.println("test.e.a correct: " + test.e.a); 16 } else { 17 System.out.println("test.e.a failed!"); 18 } 19 if (test.f != null && test.f.a == 579) { 20 System.out.println("test.f.a correct: " + test.f.a); 21 } else { 22 System.out.println("test.f.a failed!"); 23 } 24 } 25 } 26 27 // vim: tabstop=4 expandtab shiftwidth=4