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
Can we have two methods in a class with the same name?
What is the disadvantage of java?
What is == in java?
What is a pointer and does java support pointers?
What is argument in java?
How hashmap increases its size in java?
What is java argument list?
Can we create an object of private class?
how to create multithreaded program? : Java thread
Difference between association, composition and aggregation?
What is immutability in java?
What are the two ways in which thread can be created?
What is the meaning of find and replace?
Which sorting is best in java?
What is instance synchronization?