how many ways to create Thread and which one is good?
runnable interface ot Thread class?
Answer Posted / 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 |
Post New Answer View All Answers
What is the use of beaninfo?
What are the differences between graph and tree?
What is casting in java programming?
What is method reference?
How will you reverse a singly-link list?
Does garbage collection occur in permanent generation space in jvm?
Can we override singleton class?
What is the difference between double and float variables in java?
explain the difference between jdk and jvm?
What is the final method?
What is extension method in java?
Difference between == and .equals() ?
What is multiple inheritance? Is it supported by java?
how to create multithreaded program? : Java thread
What are the main differences between the java platform and other platforms?