Kamis, 28 Juli 2016

What are thread methods in java

In this article we will learn some of the thread methods like isAlive, join, suspend, resume, and stop along with sample Java programs.   isAlive() and join() Methods Even though threads are independent most of the time, there might some instances at which we want a certain thread to wait until all other threads complete their execution. In such situations we can use isAlive() and join()methods. Syntax of these methods is as follows: final boolean isAlive() final void join() throws InterruptedException final void join(long milliseconds) throws InterruptedException The isAlive() method can be used to find whether the thread is still running or

The post What are thread methods in java appeared first on Coding Security.


What are thread methods in java
read more

Tidak ada komentar:

Posting Komentar