How to cancel all threads after 5 seconds from the main thread with shared memory (shared variable)?

前端 未结 0 1184
北海茫月
北海茫月 2021-01-23 15:11

My code:

public class Task3 {
    public static void main(String[] args) throws InterruptedException {
    
    ExecutorService poolOfThreads = Executors.newFixed         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题