错误提示:No enclosing instance of type MultiThread is accessible. Must qualify the allocation with an enclosing instance of type MultiThread(e.g. x.new A() where x is an instance of MultiThread)。
翻译:翻译为没有MultiThread类型的内部类实例,必须指定MultiThread的内部类实例。
分析:在类MultiThread的主方法里面定义了一个内部类,然后用new关键字创建了该内部类的对象。但是我没有注意到主方法是static类型的。而静态方法是不能够直接访问非静态方法的实例的。所以需要把内部类改为public static class。