1.线程启动时,调用run()方法,我如何给run()里边传一个参数?
public void run(String str){
}//好像不行?我该怎么整?
2.
SendThread st = new SendThread();
st.start();
start()是启动线程
SendThread st = new SendThread();
st.run()
run()是又是怎么回事?
谢谢!
...全文
332打赏收藏
关于线程的疑惑,请指点,谢谢!
1.线程启动时,调用run()方法,我如何给run()里边传一个参数? public void run(String str){ }//好像不行?我该怎么整? 2. SendThread st = new SendThread(); st.start(); start()是启动线程 SendThread st = new SendThread(); st.run() run()是又是怎么回事? 谢谢!