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
Explain the difference between a Thread and a Process.
what is meant wrapper classes?
Write a program to solve producer consumer problem in java?
What is purpose of find feature?
What is a conditional equation?
What is qualitative variable?
What is the static field modifier?
What is math floor in java?
What is the use of arraylist in java?
what methods would you overwrite in java.lang.object class?
Can each java object keep track of all the threads that want to exclusively access it?
Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.
What is Java Shutdown Hook?
Why is java so important?
How to perform selection sort in java?