這讓我非常瘋狂。我有一個工作正常的包,然後我重新命名了包,現在我不能使用System.out
(或System
類中的任何東西)。因爲它的價值在於我的Main
班(除了System.out
線以外,我已經刪除了所有東西,以防其他問題導致此問題)。System.out is not recognized
package goldminetosugarconvertor;
public class Main
{
public static void main(String[] args)
{
System.out.println("prog init");
}
}
在NetBeans中在System.out.println
的out
是強調了與錯誤"cannot find symbol"
,但奇怪的是它顯示的位置爲「goldminetosugarconvertor.System
類」,這顯然是錯誤的。
任何好點子?我猜測,當我重新命名了這個軟件包時,有些東西壞了,但我無法弄清楚什麼會破壞如此糟糕以至於System
未被識別。
你讓ide執行包的重命名嗎? – davogotland 2011-12-23 02:49:14
那麼,顯而易見的問題是:你在'goldminetosugarconvertor'包中有一個名爲System的類嗎? – 2011-12-23 02:51:11
嘗試關閉alle文件然後項目然後IDE,然後重新啓動並再次加載項目。 – HectorLector 2011-12-23 02:51:29