Why we call Thread.start() method which in turns calls run method?

后端 未结 12 1113
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-29 01:40

Why do we call the thread object\'s start() method which in turns calls run() method, why not we directly call run() method?

12条回答
  •  离开以前
    2020-11-29 02:25

    I presume you are talking about starting a thread. If that's the case the reason you don't invoke the run method directly is that you then would be calling the method, and not starting the thread.

提交回复
热议问题