how many ways to create Thread and which one is good?
runnable interface ot Thread class?
Answers were Sorted based on User's Feedback
Answer / balaji@cse@crr engg@eluru
types of creating thread
1)extend thread class
2)implement by runnable interface
=>2"nd method is good because by using interface we can
implement multiple inheritance
| Is This Answer Correct ? | 16 Yes | 0 No |
Answer / guest
Two ways to create threads
1)by creating thread class
class classname extends Thread
{
}
2)By converting class to thread ie using Runnable interface
| Is This Answer Correct ? | 11 Yes | 3 No |
Answer / srinu
Two ways of creating Thread
1)By extending java.lang.Thread class
2)By implementing java.lang.Runnable interface
Here 2"nd way is good because by using interface we can
implement multiple inheritance in our class
| Is This Answer Correct ? | 7 Yes | 0 No |
How do you declare an array in java?
What are different types of inner classes ?
What is the impact of declaring a method as final?
What is the escape character in java?
How can we get one Interface methods whit out using implementation of interface
What is meant by method overriding?
is it possible to add a object in a HASHMAP
Can we define package statement after import statement in java?
What are hot spots in Java programming?
What is the difference between I ++ and ++ I in java?
How do you check whether the list is empty or not in java?
What are the types of literals?