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

How a variable is stored in memory?

0 Answers  


What is bitwise complement?

0 Answers  


what is difference between type 4 driver and type 1 driver?

2 Answers   CMC, CTS, IBM, JK Technosoft, Napier Healthcare,


How do you find the absolute value?

0 Answers  


What is the difference between the reader/writer class hierarchy and the inputstream/outputstream class hierarchy in java programming?

0 Answers  


I have one POJO class(Java bean class), it has two variables for that it has setters and getters. Now i have created two objects for that class and i have set the data for those variables through this two objects. Now question is i want check whether those two objects have same data or not, for this write a program? Thanks, Bose.

2 Answers   Oracle,


What is difference between static class and normal class?

0 Answers  


What is immutable class? how to make a Class explicitly "Immutable"?Wap to make a class explicitly immutable.

3 Answers  


Difference between hashCode() & equals()?

3 Answers   HCL,


what is meta-Inf?

2 Answers   Polaris,


What is math in java?

0 Answers  


What is default switch case? Give example.

0 Answers  


Categories