Java examples for java.lang:Thread
Display information about a thread.
//package com.java2s; import java.io.PrintWriter; public class Main { /**/* w w w. j a v a 2s . co m*/ * Display information about a thread. */ private static void printThreadInfo(PrintWriter out, Thread t, String indent) { if (t == null) { return; } out.println(indent + "Thread: " + t.getName() + " Priority: " + t.getPriority() + (t.isDaemon() ? " Daemon" : "") + (t.isAlive() ? "" : " Not Alive")); } }