how to override thread.start() method in java?

前端 未结 10 1830
情歌与酒
情歌与酒 2020-12-03 02:07

I need to implement thread.start() method in my java code. Please let me know through an example of overriding of thread.start() method and how it works?

10条回答
  •  庸人自扰
    2020-12-03 02:54

    If we provide our own implementation of start method then it will work like a normal method call and will work on the current thread stack only. New thread will not be created.

提交回复
热议问题