Hi Friends, can you give difference between extending thread
class and implementing runnable interface.
Answer Posted / ravikiran
By extending a thread class we will be restricted to the
implementation for single class only,by implementing
Runnable interface we will get extended for implementing
more than one thread
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is loop in java?
how we can make a read-only class in java?
Is java written in c?
Explain inheritance in java?
What interface is extended by awt event listeners?
What are different data structures in java?
Can a class be final?
How does thread synchronization occurs inside a monitor? What levels of synchronization can you apply?
What is thread safe in java?
What are the different approaches to implement a function to generate a random number?
How do you check if a string is lexicographically in java?
List implementations of list interface?
What about anonymous inner classes in java?
How can we use primitive data types as objects?
What is the intersection and union methods?