package com.lovecoding.day10.guanjian01;

public class TestGuanJianZi {

    public static void main(String[] args) {
        BBB bbb = new BBB();
//        bbb.a();
        bbb.b();

//        AAA aaa = new AAA();
//        aaa.a();
//
//        AAA ab = new BBB();
//        ab.a();
    }

}

class AAA{
    String a;

    {
        this.a="a";
    }

    public AAA() {
        this.a = "a";
    }

    public void a(){
        System.out.println(this);
        System.out.println("a,"+this.a);
    }
}

class BBB extends AAA{
    String b;

    {
        System.out.println(super.a);
    }

    public BBB() {
        super();
    }

    public BBB(String b) {
        //构造器
        this.b = b;
    }

    public void b(){

        this.a();
        System.out.println(super.a);
        super.a();
        System.out.println("b"+this.b);
    }

    public void c(){
        System.out.println("b");
    }

}