Hi Friends, can you give difference between extending thread
class and implementing runnable interface.
Answer Posted / murali.25
both will achieve the same functionality. Usually we implement runnable interface because if we extend thread and if we want to any application specific class, its not possible because java doesnt support multiple inheritance.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread
what do you mean by java annotations?
What was java originally called?
Will minecraft java be discontinued?
What are thread local variables?
What are scalar data types?
What are the benefits of operations in java?
How to convert string to char and vice versa?
What is difference between adapter class and listener?
Explain the difference between abstract class and interface in java?
What are the methods of object class ?
What is the syntax and characteristics of a lambda expression? Explain
What is the difference between an if statement and a switch statement?
Which collection allows duplicate values in java?
Is stringwriter thread safe?