收起
Class A{ int i; A(int j){ this.i =j; } } Class B{ A a=new A(1); }
这里注意定义构造方法以后,默认的空参构造方法会被覆盖。
报告相同问题?