Hi Friends, can you give difference between extending thread
class and implementing runnable interface.
Answer Posted / ravikiran
By extending a thread class we will be restricted to the
implementation for single class only,by implementing
Runnable interface we will get extended for implementing
more than one thread
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is struts in java?
What are different access specifiers in java? Explain
What was java originally called?
What do you understand by the term string pool?
What are static variables and functions?
Can a class have more than one object?
What class of exceptions are generated by the java run-time system?
Can an unreferenced object be referenced again?
Is node a data type in java?
How do you ensure that n threads can access n resources without deadlock?
If an application has multiple classes in it, is it okay to have a main method in more than one class?
What's the base class of all exception classes?
What is the purpose of a parameter?
What do you mean by checked exceptions?
What happens when a thread cannot acquire a lock on an object in java programming?