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
How to do a true java ping from windows?
How do you take thread dump in java?
What are the 4 versions of java?
Is null false in java?
What is the use of :: in java?
What is bool mean?
What is derived datatype?
Can constructor return value?
What is singleton math?
What does jenkins do?
What happens if we don’t define serial version uid?
Explain differences between collection api and stream api?
Can you sort a list in java?
What is the purpose of using javap?
What is hashmap and map?