代码拉取完成,页面将自动刷新
package ch4;
public class Leaf {
int i; // 成员变量,或属性i
Leaf(int i){ //构造方法,带有参数int i
//this.i = i;
this.i = i;
System.out.println("运行到Leaf(int i)");
}
Leaf(){
this(1);
System.out.println("运行到Leaf()");
}
Leaf increment() {
i++;
return this;
}
void print() {
System.out.println("i = " + i);
}
public static void main(String[] args) {
Leaf leaf = new Leaf();
//leaf.increment().increment().print();
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。