Android examples for java.lang:Thread
show Thread Names
//package com.java2s; import java.util.Set; import android.util.Log; public class Main { public static void showThreadNames() { Set<Thread> threadSet = Thread.getAllStackTraces().keySet(); Thread[] threadArray = threadSet.toArray(new Thread[threadSet .size()]);/*from w ww .jav a 2s .co m*/ for (Thread t : threadArray) { Log.d("THREAD", "Thread: " + t.getName()); } } }