java:No enclosing instance of xx is accessible.

No enclosing instance of xx is accessible. 这个问题的产生主要是因为内部类的调用出错。 举个栗子:   解决方案: 1.将类改为静态内部类,在class 前加static 2.先实例化当前类,再实例化内部类
相关文章
相关标签/搜索