代码示例:
package com.thb; public class Test5 { public static void main(String[] args) { Thread thread = Thread.currentThread(); System.out.println("is daemon: " +thread.isDaemon()); } }
运行输出: