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?

Answers were Sorted based on User's Feedback



Suppose i have two threads t1 and t2 are running.How the main thread will know that the two threads..

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

Suppose i have two threads t1 and t2 are running.How the main thread will know that the two threads..

Answer / fellow java novice

use join

Is This Answer Correct ?    9 Yes 19 No

Post New Answer

More Core Java Interview Questions

Variable of the boolean type is automatically initialized as?

0 Answers  


Why charat is used in java?

0 Answers  


What is the difference between a loader and a compiler?

0 Answers   Syntel, Visa,


Why null value is used in string?

0 Answers  


What is the access scope of protected access specifier?

0 Answers  






To the class members how can we provide security?

1 Answers   Aspire,


In what ways you can handle exception ?

3 Answers  


What is the base class of all exception classes?

0 Answers  


Differentiate between stringbuffer and string?

0 Answers  


What is the java project architecture?

0 Answers   IBM,


Is singleton class immutable?

0 Answers  


what is struts-config-xml?and its use?

3 Answers  


Categories