課程
/后端開發(fā)
/Java
/深入淺出Java多線程
Thread actressThread = new Thread(new Actress(),"Ms. Runnable");
能解釋一下這一行代碼嗎?詳細點,謝謝
2015-10-12
源自:深入淺出Java多線程 2-3
正在回答
去意見反饋。會有人解決的為什么?配置系統(tǒng)變量,就是所有用戶都可以用,配置用戶變量就是只用當前用戶可以用?
為什么 我的就報錯
?No enclosing instance of type Actor is accessible. Must qualify the allocation with an enclosing instance of type Actor (e.g. x.new A() where x is an instance of Actor).
調(diào)用了這個方法,可以查查JDKpublic Thread(Runnable?target, String?name)
慕斯卡4106679
沒看視頻,new Actress() 應該是實現(xiàn)runnable接口類吧,"Ms. Runnable"給該線程一個Threadname
舉報
帶你一起深入淺出多線程,掌握基礎(chǔ),展望進階路線
1 回答Thread actressthread=new Thread(new Actress(),"Ms.Runnable");報錯啊
2 回答Thread actressThread=new Thread(new Actress(),"MsRunnable")為什么創(chuàng)建Actress()實例用要用Thread的方法
2 回答new Thread
3 回答Thread actor=new Thread(new Actor(),"Mr.Thread");
4 回答thread類里new一個Actress為什么會報錯
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2022-03-24
去意見反饋。會有人解決的為什么?配置系統(tǒng)變量,就是所有用戶都可以用,配置用戶變量就是只用當前用戶可以用?
2017-03-27
為什么 我的就報錯
?No enclosing instance of type Actor is accessible. Must qualify the allocation with an enclosing instance of type Actor (e.g. x.new A() where x is an instance of Actor).
2015-11-09
調(diào)用了這個方法,可以查查JDKpublic Thread(Runnable?target, String?name)
2015-10-14
沒看視頻,new Actress() 應該是實現(xiàn)runnable接口類吧,"Ms. Runnable"給該線程一個Threadname