What is more advisable to create a thread, by implementing
a Runnable interface or by extending Thread class?
Answer Posted / harish
When u extend a Thread each of your thread has a unique
object associated with it,where as with Runnable interface
may threads share the same object instance.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the point of java?
State the significance of public, private, protected class?
What is arrays sort in java?
What are the differences between throw and throws?
How many bytes is a string in java?
Explain about exception propagation?
Can constructor return value?
What are the methods available in a class?
Explain differences between collection api and stream api?
What is character in data type?
When should I use singleton?
Is there any case when finally will not be executed?
What are three advantages of using functions?
Name some OOPS Concepts in Java?
How do you detect memory leaks?