while creating thread why we extend thread class

Answers were Sorted based on User's Feedback



while creating thread why we extend thread class..

Answer / jayaprasad

calling the Thread class methods like start().

Threads can be created in two ways
1) extends Thread class
2) implementing Runnable interface.

Is This Answer Correct ?    10 Yes 0 No

while creating thread why we extend thread class..

Answer / pamal janveja

To create User Defined thread, We requires features of thread
and java provide us Thread class.
We simply over right its run method and called this by start method which internally call to run method.
Similarly using other methods of Thread class , we can create,access and delete user defined thread.

Note:- Without Thread class or Runnable interface , We can not create User defined Thread.

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is emant by API? is it related to java only or it is common for all OOPS supporting language?

3 Answers  


How are multiple inheritances done in Java?

0 Answers   Atos Origin,


What is functional interface in java?

0 Answers  


what is the difference between @include page and @include file

2 Answers  


what is marker interface ? what is the necessity of it?

5 Answers   Accenture, Newgen,






Where pragma is used?

0 Answers  


What is java argument list?

0 Answers  


Can a class have more than one object?

0 Answers  


what do you meant by Runtime Polymorphism?

13 Answers   BVIMR, IBM, Persistent,


What is function declaration?

0 Answers  


Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?

0 Answers  


Is sizeof a keyword in java programming?

0 Answers  


Categories