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


Please Help Members By Posting Answers For Below Questions

explain the concept of virtual method invocation in polymorphism in detail?

1930


What do you mean by composition in java?

776


Can we declare an array without size in java?

713


Can you explain the cs option of java interpreter?

703


Why to use nested classes in java?

788


Give the hierarchy of inputstream and outputstream classes.

817


What is the indent key?

791


What is a static method in java?

761


Is array synchronized in java?

795


How can you make sure that your singleton class will always return single instance in multi-threaded environment?

778


What do you mean by Function Overloading in java?

927


What is the purpose of sizeof operator?

744


What is the difference between a switch statement and an if statement?

755


What is the difference between access specifiers and access modifiers in java?

834


What is mysql driver class name?

806