class A{ public String TAG="TAGA"; public String c="---C"; public A(){ Log.i(TAG, "A: "+this+this.TAG+this.c); this.funA1(); } public void funA1(){ Log.i(TAG, "funA1: "); } } class B extends A{ public String TAG="TAGB"; public B(){ super(); Log.i(TAG, "B: "+this+this.TAG+this.c); this.funA1(); } @Override public void funA1() { Log.i(TAG, "funA1: "); super.funA1(); } public static void main(String[] args) { new B(); } }
2022-02-20 19:22:19.664 13648-13764/com.example.bottomnavigationactivityapp I/TAGA: A: com.example.bottomnavigationactivityapp.B@efc6238TAGA---C
2022-02-20 19:22:19.664 13648-13764/com.example.bottomnavigationactivityapp I/TAGA: funA1:
2022-02-20 19:22:19.664 13648-13764/com.example.bottomnavigationactivityapp I/TAGB: B: com.example.bottomnavigationactivityapp.B@efc6238TAGB---C
2022-02-20 19:22:19.664 13648-13764/com.example.bottomnavigationactivityapp I/TAGB: funA1:
2022-02-20 19:22:19.664 13648-13764/com.example.bottomnavigationactivityapp I/TAGA: funA1: