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
Explain serialization and deserialization in java?
What are the states of thread in java?
Why Java doesn’t support multiple inheritance?
What is the difference between jvm and jre? What is an interface?
What data type is a string?
Can a class extend more than one class?
How can we access some class in another class in java?
What is the class in java?
What is the default size of load factor in hashing based collection?
What is scope & storage allocation of static, local and register variables? Explain with an example.
What is quick sort in java?
Discuss about garbage collector in Java.
How do you clear a list in java?
How can you read content from file in java?
What is the file extension for java?