public static void main(String[] args) {
ExecutorService e = Executors.newCachedThreadPool();
e.execute(new test1());
}
class test1 implements Runnable{
public void run(){
System.out.println(“毛二狗”);
}
}
在class 前加个static就可以了
No enclosing instance of type **
最新推荐文章于 2022-03-25 11:33:58 发布