while creating thread why we extend thread class
Answers were Sorted based on User's Feedback
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 |
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 |
How a variable is stored in memory?
What is bitwise complement?
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?
What is the difference between the reader/writer class hierarchy and the inputstream/outputstream class hierarchy in java programming?
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.
What is difference between static class and normal class?
What is immutable class? how to make a Class explicitly "Immutable"?Wap to make a class explicitly immutable.
Difference between hashCode() & equals()?
what is meta-Inf?
What is math in java?
What is default switch case? Give example.