调用Thread类中interrupt(),没有异常抛出。但是调用isInterrupted()测试线程是否中断,返回false.代码如下public class ThreadKiller
{
public static void main(String args[]){
// Find the root thread group
    //ThreadGroup root = Thread.currentThread().getThreadGroup().getParent();
ThreadGroup root = Thread.currentThread().getThreadGroup();
System.out.println((new java.util.Date()).toString());
System.out.println("Start**********************************");
    while (root.getParent() != null) {
        root = root.getParent();
//System.out.println("tttt");
    }
    
    // Visit each thread group
    visit(root, 0); System.out.println("END**********************************");
}
    
    // This method recursively visits all thread groups under `group'.
    public static void visit(ThreadGroup group, int level) {
        // Get threads in `group'
        int numThreads = group.activeCount();
System.out.println("group=" + group.getName());
        Thread[] threads = new Thread[numThreads*2];
        numThreads = group.enumerate(threads, false);
//System.out.println(numThreads);
System.out.println(level + "-------------------Start");
    
        // Enumerate each thread in `group'
        for (int i=0; i<numThreads; i++) {
            // Get thread
            Thread thread = threads[i];
//System.out.println("ID=" + thread.getId());
//String thread
String threadString = thread.toString();
if (threadString.indexOf("Boss") > 0)
{
System.out.println("Name=" + thread.toString());
if (threadString.indexOf("Instance2") > 0)
{
System.out.println("Kill.................");
thread.interrupt();
System.out.println("Killed=" + thread.isInterrupted());

}
}

        }
System.out.println(level + "-------------------End");
    
        // Get thread subgroups of `group'
        int numGroups = group.activeGroupCount();
        ThreadGroup[] groups = new ThreadGroup[numGroups*2];
        numGroups = group.enumerate(groups, false);
    
        // Recursively visit each subgroup
        for (int i=0; i<numGroups; i++) {
            visit(groups[i], level+1);
        }
    }}