What is the use join() in Threads ?
Answers were Sorted based on User's Feedback
Answer / harish
It waits for the Parent Thread process to be completed.
Even though, Child process is completed. It waits for the
Parent Thread.
| Is This Answer Correct ? | 8 Yes | 3 No |
Answer / madan
if we want to finish main thread last i.e to ensure all
child threads terminate prior to the main thread
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / a.sreekanth
The join() method of a Thread instance can be used to "join" the start of a thread's execution to the end of another thread's execution so that a thread will not start running until another thread has ended. If join() is called on a Thread instance, the currently running thread will block until the Thread instance has finished executing.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / venkat
Acoording to join the two Threads for some iterations.
| Is This Answer Correct ? | 0 Yes | 9 No |
Answer / padmaja
waits for specified number of milliseconds for thread to die
| Is This Answer Correct ? | 0 Yes | 10 No |
I have a Arraylist object, it has duplecate values also. Now question is i want delete duplecate data in that objet with out using Set?
What is constructor in java ?
What is string literal in java?
Can you run the product development on all operating systems ?
Why Java is not purely object oriented?
50 Answers Elitecore, Persistent, Reliance, Wipro,
How many objects are created for a singleton class
what is the use of reference variable
Which types of exceptions are caught at compile time?
What is an example of a boolean?
What are some examples of variable costs?
What is the difference between jsp and servlet?
What is meant by javabeans?