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

Can a constructor be protected?

542


What is java command?

580


How do you control extraneous variables?

520


What do you understand by a Static Variable?

648


What is unmodifiable list in java?

543






What is return in java?

570


Can we override the private methods?

538


What is difference between this and super keyword?

533


How can we create objects if we make the constructor private ?

554


Is string thread safe in java?

600


Is string is a data type in java?

602


What is the purpose of abstract class?

538


What is balanced tree in java?

542


Differentiate between vector and array list.

646


what is meant by HQL?

651