ExecutorService测试07

package t1;

import java.util.concurrent.Executor;

public class TestThread19 {

public static void main(String[] args) {
Runnable r = () -> {
System.out.println("Runnable");
};

Executor executor = (Runnable w) -> {
w.run();
};
executor.execute(r);
}

}

输出结果:

Runnable

posted @ 2020-04-01 08:51  工设091  阅读(82)  评论(0)    收藏  举报