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 the difference between array and array list in java?
Why is whitespace important?
How many types of flags are there?
What is the covariant return type?
Why is logger singleton?
Explain about anonymous inner classes ?
What is method in java with example?
we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.
Why do we need hashset in java?
Difference between string, stringbuffer and stringbuilder?
5 Coding best practices you learned in java?
Can a static class have a constructor?
What is the difference between object oriented programming language and object based programming language?
What is a instance variable in java?
What is static synchronization?