特牛网址导航

语法错误:No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing_no enclosing instance of type streamdistinct is ac_mmffn的博客-CSDN博客

网友收藏
  • 链接地址:https://blog.csdn.net/mmffn/article/details/121638222
  • 链接标题:语法错误:No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing_no enclosing instance of type streamdistinct is ac_mmffn的博客-CSDN博客
  • 所属网站:blog.csdn.net
  • 被收藏次数:3878
错误问题No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing没有能被访问到的 外部类E的实例。必须获取一个外部类E的对象(例如: x.new A(), x是E的实例 )原因:原来我写的内部类是动态的,也就是开头以public class开头。而主程序是public static class main。在Java中,类中的静态方法不能直接调用动态方法。只有将某个内部类修_no enclosing instance of type streamdistinct is accessible. must qualify the