Answer Posted / virendrasinh gohil
The only way to create a thread is using a thread class.
(Either by extending it or creating object elsewhere).
Runnable does very little contribution here. It's just
that, the thread object expects instance of a class which
should have run() (semantics) method and is called via
runnable interface. Runnable method doesn't create any
thread by itself (sounds dumb as everybody knows Runnable
is an interface).
Calling Thread's start() is the only way in java to spawn a
separate independed execution with in the application.
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is replacefirst in java?
What are the restriction imposed on a static method or a static block of code?
What is used of static keyword in java?
Convert Binary tree to linked list.
How does linkedhashmap work in java?
Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?
What are the main uses of the super keyword?
Is java 1.7 the same as java 7?
What is variable and constant explain with example?
Why we use protected in java?
Is call by reference possible in java?
What is a jit compiler?
Explain the importance of finally over return statement?
What is your platform?s default character encoding and how to know this?
How to make object serializable in java?