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 write a program for sending mails between client and server
Can we override the static method?
What are the four versions of java?
What super () does in java?
What is the purpose of static keyword in java?
How to use arraylist in java netbeans?
What is the final method?
Differences between C and Java?
what is a green thread? : Java thread
What is the difference between access specifiers and access modifiers in java?
What is foreach loop in java?
Why string is immutable or final in java
Is string pool garbage collected?
What is var keyword ?
Is arraylist a class in java?