摘要:
this用在构造器中,当使用不同参数列表的构造器时,如果有构造器和另外一个构造器的功能一样,则这个构造器可以调用那个构造器的功能使用格式:this(value);class Test{Test(){....} //空参数的构造函数Test(Datatype var)//带一个参数的构造器{this()....}Test(Datatype var1 ,Datatype var2) //带两个参数的构造器{this(var1);........}Test(Datatype var2,Datatype var2,Datatype var3){this.. 阅读全文