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

Why is flag used in java?

639


What is a generic type?

648


What is a boolean structure?

655


What is a singleton factory?

605


What isan abstract class and when do you use it?

1001






List any five features of java?

676


How can you share data between two thread in Java?

607


What is are packages?

679


What is the preferred size of a component in java programming?

622


Is string serializable in java?

615


How to handle a web browser resize operation?

627


Write a program to reverse array in place?

676


Explain the difference between abstract class and interface in java?

629


What is fail fast in java?

676


What is exception hierarchy in java?

663