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

If two threads call a static method at the same point of time, what will happen?

3 Answers   KPIT,


What are constructors in java?

0 Answers  


Which category the java thread do fall in?

0 Answers  


What is 32 bit float?

0 Answers  


What is the equal sign?

0 Answers  






Why main function is static?

0 Answers   MCN Solutions,


When you say String is immutable, what do you mean by that? Say I have String s = "Ness" s= s+"Technologies"; What will happen? If the value gets appended, then what is the meaning of immutable here?

5 Answers   Ness Technologies,


Name the package that most of the AWT events that supports event-delegation model are defined?

2 Answers  


What are null interfaces in JAVA ? and give me some examples?

5 Answers  


Can You Have Virtual Functions In Java?

0 Answers  


System.out.println(101/14) what is the output? a)6 b)14 c)7.14 d)0

8 Answers   Accenture,


Is 0 a prime number?

0 Answers  


Categories