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
How will you invoke any external process in java?
Why chararray() is preferred over string to store the password?
In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?
Is array size fixed in java?
What is the symbol for space?
State the merge-sort principle and its time complexity.
Can two objects have same hashcode?
Explain public static void main(string args[]).
What function extracts specified characters from a string?
Is java owned by oracle?
What is a method header?
What are constructors in java?
Explain method local inner classes ?
What is meant by method overriding?
What is difference between classpath and path variables in java?