我新建了一个线程组和一个线程,现在我想指定这个线程所在线程组为新线程组。如何做?请大家帮帮我啊
解决方案 »
- 显示一个本地计算机中的文件夹的树形结构
- 我觉得NumberFormatException 根本不能算运行时异常。。。。质疑ing
- Java 函数 返回多个数组以及数组的长度
- 能改变这个动画的大小吗?
- 100分求问/回答即给分
- SWING 问题,对于TABLE 行来说,如何能让里面装的checkbox 正确响应
- 有人能给讲一下[],set,array,vector,hashtable,hashmap等等的区别吗?我都晕了好长时间了
- 有人用IntelliJ IDEA写JAVA程序吗?问个关于设置的问题
- 联结interbase数据库库时出现错误!提示如下,请帮忙!
- 紧急求救:我写了一个Applet,用到了Java Plug-in1.3.1,在IE调用它,但每当移动IE窗口时,却发生如下怪现象..
- java技术
- 请问swing如何连接数据库··请高手指点
我现在去看看为什么。/
/**
* Adds the specified Thread to this group.
* @param t the Thread to be added
* @exception IllegalThreadStateException If the Thread group has been destroyed.
*/
void add(Thread t) {
synchronized (this) {
if (destroyed) {
throw new IllegalThreadStateException();
}
if (threads == null) {
threads = new Thread[4];
} else if (nthreads == threads.length) {
Thread newthreads[] = new Thread[nthreads * 2];
System.arraycopy(threads, 0, newthreads, 0, nthreads);
threads = newthreads;
}
threads[nthreads] = t; // This is done last so it doesn't matter in case the
// thread is killed
nthreads++;
}
}
public Thread(ThreadGroup group,
Runnable target)来指定线程组啊