3 回答

動漫人物
TA貢獻(xiàn)1815條經(jīng)驗 獲得超10個贊
有這個方法
/**
* Allocates a new <code>Thread</code> object. This constructor has
* the same effect as <code>Thread(null, null, name)</code>.
*
* @param name the name of the new thread.
* @see #Thread(ThreadGroup, Runnable, String)
*/
public Thread(String name) {
init(null, null, name, 0);
}

瀟湘沐
TA貢獻(xiàn)1816條經(jīng)驗 獲得超6個贊
public Thread(String threadName) {
if (threadName == null) {
throw new NullPointerException();
}
create(null, null, threadName, 0); }
添加回答
舉報
0/150
提交
取消