// This class extends Thread class MyThread extends Thread { MyThread() { // Thread can be set as a daemon thread in the constructor setDaemon(true); } // This method is called when the thread runs public void run() { // Determine if this thread is a daemon thread boolean isDaemon = isDaemon(); } }