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 |
Can we overload the main() method?
If a class is declared without any access modifiers, where can the class be accessed?
How multi processing is achieved in JAVA?
How TreeMap sorts the objects inside it?? suppose if have include one employee object and one car object. On what basis it will sort?
How many types of classes are there in java?
Which sorting is used in arrays sort in java?
Explain hashset and its features?
What is meant by final class?
What is the original name of java?
How to prevent a field from serialization ?
What is string data?
whar are the draw backs of programming lang step by step in Clang and next in C++ and next and in Java nad in .Net