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 does n mean in java?
Give an example of call be reference significance.
How many bits is a string?
How do you escape sequences in java?
What is meant by flickering?
Explain the public class modifier?
How do you do a line break in java?
Explain access modifiers in java.
What a static class can contains?
Explain about doubly linked list
What are decalarations?
What is string builder?
Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.
Explain the use of shift operator in java. Can you give some examples?
How do you check if an arraylist is not empty?