语法错误: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博客

网站介绍:错误问题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