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
Why string is not thread safe?
Explain constructors and types of constructors in java.
What are the different approaches to implement a function to generate a random number?
Explain the concept of proper inheritance?
Explain where variables are created in memory?
What are static variables and functions?
What is the size of string?
What differences exist between iterator and listiterator?
Explain the importance of import keyword in java?
placement papaers of spring computing technology
What is numeric function?
How is hashset defined in java?
What is method overloading and method overriding?
Which of the classes will have more memory allocated?
Where is stringbuffer stored?