Java Thread isAlive() methodThe isAlive() method of thread class tests if the thread is alive. A thread is considered alive when the start() method of thread class has been called and the thread is not yet dead. This method returns true if the thread is still running and not finished. SyntaxReturnThis method will return true if the thread is alive otherwise returns false. ExampleTest it NowOutput: before starting thread isAlive: false after starting thread isAlive: true is run() method isAlive true Next TopicJava Thread |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India