import java.awt.Button;
public class A {
private Button b ;
public Button getB() {
return b;
}
public void setB(Button b) {
this.b = b;
}
A(){
b = new Button();
B b = new B(this);
}
public static void main(String[] args){
new A();
}
}
class B {
A past = new A();
B(A p){
this.past = p;
}
}
不太明白 为什么这段代码会报堆栈溢出的错误,,,