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 is the importance of finally block in exception handling?
why we use merge option in hybernate pls give a ex snippet
Is a method a function?
What is a copy constructor in java?
Explain about interrupt() method of thread class ?
Can we use catch statement for checked exceptions?
Write an algorithm program in java for the following question.. In a VLSI design techniques,they used rectangles to design circuits. EVery rectangle is to be placed according to x,y coordinates. Check whether or not two rectangles overlap each other. Here overlapping of rectangles is acceptable, if 1) one rectangle intersect with other. 2) one rectangle fully covers other. The time of algorithm should not exceed o(n logn).
how to create multithreaded program? : Java thread
What are java annotations?
What are default methods ?
What is the escape character in java?
Why object class is super class for every class in java?
What is the role of garbage collector in java?
What is a dot notation?
Why pointers are not used in java?