Java 基础 关于内部类的小问题 大神来解释下哇
public class Test {
/**构造方法*/
Test(){
this(new A()); //这行报错
}
Test (A a){
}
/**内部类 */
class A{}
}
错误信息:No enclosing instance of type Test is available due to some intermediate constructor invocation
中文意思:由于某些中间构造函数调用,没有类型测试的封闭实例可用