class AAA{ String a="AAA"; void show(){System.out.println("AAA.show()");}}
class BBB extends AAA{ String a="BBB"; void show(){System.out.println("BBB.show()");}}
public class javatest3 { public static void main(String arg[]){ AAA hoge1 = new AAA(); AAA hoge2 = new BBB(); BBB hoge3 = new BBB(); hoge1.show(); hoge2.show(); hoge3.show(); System.out.println(hoge1.a); System.out.println(hoge2.a); System.out.println(hoge3.a);}}