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?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is reflexive association?

975


Which variables are stored in heap?

520


What is connection class in java?

489


Can a class have a static inner class?

587


What is the output of the below java program?

563






What will be the output of round(3.7) and ceil(3.7)?

650


What is the difference between quicksort & mergesort? When should they be used? What is their running time?

625


What is balanced tree in java?

507


Can java inner class be static?

534


What is keyword in oop?

500


What is the difference between error and an exception?

547


What is a class object?

476


Are constructors methods?

540


How do you input a string in java?

481


Explain throw keyword in java?

586