Search your topic in Java2share
Home > FAQs
eXTReMe Tracker


Multi Threading FAQs


Untitled Document

Q9. If we are not overriding run() method what will happened?
Ans.If we are not overriding run() method then Thread class run() method will executed which has empty implementation and hence we will not get any output.

Q10.Is overloading of run() method is possible?
Ans.Yes, we can overload run() method but Thread class start() method always invokes no-argument run() method only. The other run() method we have to call explicitly then only will be executed.

Q11.Is it possible to override start() method?
Ans. Yes it is possible. But not recommended.

Q12.If we are overriding start() method then what will happen?
Ans.  It we are overriding start() method then our own start() method will be executed just like a normal method call. In this case no new Thread will be created.