创建单线程线程池的是?

分类: 单选题 发布时间: 2024-01-20 20:41 浏览量: 1

创建单线程线程池的是?

A.ExecutorService sTdPool = Executors.newSingleThreadExecutor();

B.ExecutorService fTdPool = Executors.newFixedThreadPool(nThreads);

C.ExecutorService cTdPool = Executors. newCachedThreadPool();

D.ExecutorService schdTdPool = Executors.newScheduledThreadPool(corePoolSize);

正确答案是A