Java求素数时出现错误 1.具体错误如下 No enclosing instance of type Prime is accessible. Must qualify the allocation with an enclosing instance of type Prime (e.g. x.new A() where x is an instance of Prime). 2.错误原因 class PrimNumber { public boolean isPrim(int a) { f…