第三个this调用B(int, int)这个构造函数.

解决方案 »

  1.   

    this(2,4)的意思为调用类b的构造函数,即public b(int x,int y)的调用
      

  2.   

    public B(){this(2,4);}代表调用构造函数public B(int x,int y)public B(int x,int y){this.i=x;this.j=y;}中的this代表对象本身,this.i等同于i,this.j等同于j
      

  3.   

    public B(){this(2,4);}代表调用构造函数public B(int x,int y),而前面两个this代表对象本身,this.i等同于i,this.j等同于j。
      

  4.   

    1.this都是"指向"对象自己,即例子中的class B
    2.this(2,4)指:调用class B 的有两个参数的构造函数,即public B(int x,int y).
    3.this.i=x中的this同样是指向class B,表示对成员变量赋值.