why Runnable interface is preferable than extending the
Thread class?
Answer Posted / praveen gupta
The main reason to implement Runnable interface is that 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 ? | 4 Yes | 0 No |
Post New Answer View All Answers
If a method is declared as protected, where may the method be accessed?
Define "Access specifiers" in java.
What is hash in java?
Can we able to pass objects as an arguments in java?
Is static variable stored in heap?
What is abstract class? Explain
What is ternary operator in java?
What is difference between local variable and global variable?
How many types of the indexof method are there for strings?
Can we convert integer to string in java?
How to create a custom exception?
Which software is used for java programming?
What is final variable?
Difference between nested and inner classes ?
Is a string literal?