What is the use join() in Threads ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When does a class need a virtual destructor?

524


What is the generic class?

523


What does sprintf mean?

523


What does || || mean in math?

509


What is static import?

587






Explain the differences between static and dynamic variables?

578


What are the different conditional statements?

550


What are the advantages of exception handling in java?

640


What do you mean by scope of variable?

477


What do you mean by chromounits in java8?

520


What is a boolean expression in java?

524


What are inner classes or non static nested classes in java?

697


Is main a function?

506


What is the use of runnable interface?

599


What is remote method invocation (rmi)?

607