how many ways to create Thread and which one is good?
runnable interface ot Thread class?
Answer Posted / 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 |
Post New Answer View All Answers
How we can execute any code even before main method?
What is the use of join method?
What is an infinite loop? How infinite loop is declared?
What is byte value?
What is method reference in java?
What are exceptions
What do you mean by collectors in java 8?
What is a boolean expression in java?
Why we go for collections in java?
Add a value x to array from index l to r where 0 <= l <= r <= n-1
What are scalar data types?
What is difference between fail-fast and fail-safe?
Is map ordered in java?
What is a parameter in simple terms?
What are the advantages of unicode?