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

Is java platform independent?

572


Can private method static?

475


How do you sort in java?

602


What data type is true or false?

580


Explain try and catch keywords in java?

625






What is array length in java?

531


What is port number in java?

598


Is sizeof a preprocessor?

547


What does ide stand for?

525


Can we declare an array without size in java?

524


How do you reverse a string in java without using string buffer?

595


How will you serialize a singleton class without violating singleton pattern?

1528


What is the biggest integer?

558


What is the difference between instanceof and isinstance?

570


What is outofmemoryerror in java?

571