type StudentText is accessible. Must qualify the allocation with an enclosi"/>
No enclosing instance of type StudentText is accessible. Must qualify the allocation with an enclosi
No enclosing instance of type StudentText is accessible. Must qualify the allocation with an enclosing instance of type StudentText (e.g. x.new A() where x is an instance of StudentText).
主程序是public static class main,类中的静态方法不能直接调用动态方法。只有将内部类修饰为静态类,之后才能够在静态类中调用该类的成员变量与成员方法。所以,最简单的解决办法是将 class改为 static class.
更多推荐
No enclosing instance of type StudentText is accessible. Must qualify the alloca
发布评论