Suppose i have two threads t1 and t2 are running.How the
main thread will know that the two threads t1,t2 execution
has completed?
Answers were Sorted based on User's Feedback
Answer / satishkumar vishwakarma
with the help of isAlive() and join() method.
The isAlive returns true when threads are running and
join() will wait till the execution get completed.
| Is This Answer Correct ? | 58 Yes | 1 No |
What is a final class ?
Explain the private protected method modifier?
What are alternatives to java serialization?
Why synchronization is important in java?
Can an unreachable object become reachable again?
Will the jvm load the package twice at runtime?
Why is the main method declared static?
Explain reverse a linked list recursive java solution?
Can i have abstract class with no abstract methods?
How can you make sure that your singleton class will always return single instance in multi-threaded environment?
What is the meaning of 3 dots in java?
Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.