Home » Java Thread isDaemon() Method with Examples

Java Thread isDaemon() Method with Examples

by Online Tutorials Library

Java Thread isDaemon() method

The isDaemon() method of thread class checks if the thread is a daemon thread. If the thread is daemon thread, this method will return true else it returns false.

Syntax

Return

This method will return true if the thread is daemon thread otherwise return false.

Example

Test it Now

Output:

daemon thread work  user thread work  user thread work  

You may also like