标签:his span 自己 out uri size this void pop
public class ThisDemo { public ThisDemo() { this.number=20; } public ThisDemo(int number,int number2) { this();//调用无參数的构造函数 this.number2=number2; } ThisDemo increment(){ number++; number2++; return this; } private void print(){ System.out.println("number="+number+";number="+number2); } public static void main(String[] args) { ThisDemo tt=new ThisDemo(); tt.increment().increment().increment().print(); } }
标签:his span 自己 out uri size this void pop
原文地址:http://www.cnblogs.com/gavanwanggw/p/7343894.html