why Runnable interface is preferable than extending the
Thread class?
Answer Posted / susheeel
Many Java programmers feel that classes should be extended
only when they are enhanced or modified in some way.So,if
you will not be overriding any of Thread's other methods,it
is probably best simply to implement Runnable.
| Is This Answer Correct ? | 32 Yes | 5 No |
Post New Answer View All Answers
What package is math in java?
Is ++ operator is thread safe in java?
What is the advantage of functional interface in java 8?
Is java free for commercial?
What are constants?
Is hashset ordered?
What is the difference between reader/writer and inputstream/output stream?
Differentiate between a constructor and a method? Can we mark constructors final?
How do you declare an array that will hold more than 64KB of data?
I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?
What is difference between array and vector?
Can we override data members in java?
What is array sorting in java?
Is multiple inheritance supported by java?
What is indexof in java?