Methods in thread class

 isAlive(): To check whether a thread is alive or not 


Can we make a main thread wait?

Yes, using the method join(). we can make the main thread wait.


join(): To make another thread to wait till it finishes the execution.

sleep(): To stop or pause the execution for sometime.





Comments

Popular posts from this blog

Master and Slave Architecture in Jenkins

Dispatcher Servlet, View Resolver and Handler mapping

Load Balancers and Load Balancers Algorithms