why Runnable interface is preferable than extending the
Thread class?
Answer Posted / suresh
u know that java not supporting multiple inheritance.if u
extend thread class,u can't extend any class which you
required other than thread class.if u are implementing
runnable interface u can extend any class which you required
other than thread class.this is main advantage of
implementing runnable interface.
| Is This Answer Correct ? | 115 Yes | 13 No |
Post New Answer View All Answers
What are data structures in java?
How can you avoid serialization in child class if the base class is implementing the serializable interface?
What methods are used to get and set the text label displayed by a button object?
what do you mean by stream pipelining in java 8? Explain
How garbage collection is done in java?
What is a condition in programming?
Write a java program that prints all the values given at command-line.
What is arraylist e?
Can a constructor be protected?
Explain the difference between abstract classes and interfaces in java?
What is the main function in java?
How can we make string upper case or lower case?
What do you mean by Function Overloading in java?
How do you format in java?
What are parsing rules?