class aa{
bb b;// = new bb();
public bb getB() {
return new bb();
}
public void setB(bb b) {
this.b = b;
}
}
class bb{
aa a;// = new aa();
public aa getA() {
return new aa();
}
public void setA(aa a) {
this.a = a;
}
}
aa a = new aa();
while (a != null)
a = a.getB().getA();
死循环的另外一种写法
最新推荐文章于 2019-07-30 17:37:04 发布