出现 Multiple markers at this line
- No enclosing instance of type ParamTest03 is accessible. Must qualify the allocation with an enclosing instance of type ParamTest03 (e.g. x.new A() where x is an instance of ParamTest03)这样的错误。
看是不是把类写在了别的类里面。
例如
public class TestExtends { public static void main(String[] args) { human people = new human(); } class human{ String name; } }
正确的写法应该是
public class TestExtends { public static void main(String[] args) { human people = new human(); } } class human{ String name; }