Starting multiple thread at the same time

后端 未结 4 629
醉酒成梦
醉酒成梦 2021-01-28 13:56

I have been trying to write some java application. What this application wants to run is processing a text file.

However, that input text file is large, (over 200mb) I t

4条回答
  •  时光取名叫无心
    2021-01-28 14:04

    You need to start a thread. So:

    new Thread(worker1).start();
    new Thread(worker2).start();
    new Thread(worker3).start();
    new Thread(worker4).start();
    

提交回复
热议问题