why Runnable interface is preferable than extending the
Thread class?
Answer Posted / srinu
you know that java does not supporting multiple inheritance
through classes .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 java.lang.Runnable interface.
Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
What are recursive functions?
What are the important features of Java 11 release?
What is the abstraction?
What is the purpose of void?
What is the difference between iterator and list iterator?
Do extraneous variables affect validity?
Why string is called as immutable?
How can we create a synchronized collection from given collection?
How do you sort data in java?
Why java is made?
What is the finalize method do?
What do you mean by thread safe?
What happens if we override private method?
What is the final class?
What is integer size in java?