Starting multiple thread at the same time

后端 未结 4 621
醉酒成梦
醉酒成梦 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:20

    Runnable object is not Thread, you need use Thread to run the Runnable Object, like this:

    new Thread(worker1).start();
    

    but i think you may face other problems, so please read the java document.

提交回复
热议问题