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 are the types of methodology?
What are the basic interfaces of java collections framework?
What is the difference between Error, defect,fault, failure and mistake?
What is the inheritance?
What value is a variable of the string type automatically initialized?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
Is overriding possible in java?
Is a char always 1 byte?
How would overload a function based on return type?
What is externalizable interface?
What is the dot operator?
Write a method to check if input string is palindrome?
What is double data type?
How do I stop concurrentmodificationexception?
What is the difference between yield() and sleep()?