the import com.imooc.MyClass is never used
在主方法中導(dǎo)入包,結(jié)果顯示the import com.imooc.MyClass is never used,然后運(yùn)行的時(shí)候沒有任何結(jié)果
在主方法中導(dǎo)入包,結(jié)果顯示the import com.imooc.MyClass is never used,然后運(yùn)行的時(shí)候沒有任何結(jié)果
2019-01-05
舉報(bào)
2019-01-23
你的類是MyClass,就改為MyClass test = new MyClass();
2019-01-23
警告并不影響你當(dāng)前運(yùn)行。你當(dāng)前沒有任何輸出結(jié)果:是因?yàn)槟阒粍?chuàng)建了了一個(gè)TestMain 的實(shí)例test,你想要的應(yīng)該是在TestMain中創(chuàng)建一個(gè)MyTest的實(shí)例。你將TestMain test = new Testmain();改為:MyTest test = new MyTest();即可?
2019-01-05
首先這類報(bào)錯(cuò)是因?yàn)?你導(dǎo)入?yún)s沒有用到,給你的警告 。the import? ?XXXX? ?is never used? (xxx是什么什么包)
?其次 你這個(gè)代碼 也并不會(huì)有任何輸出結(jié)果