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
Explain exception chaining in java?
Why does java doesnt suuport unsigned values?
How do you calculate square roots?
Is there any way to skip finally block of exception even if some exception occurs in the exception block?
23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an
How many bytes are there?
What is difference between identifier and variable?
List some java keywords sun like c, c + + keywords?
List out benefits of object oriented programming language?
What is a java string?
Which variables are stored in heap?
Do we have pointers in java?
make a method which any number and any type of argument and print sum of that arguments.....
How do you allocate memory to object?
Are primitives objects?