这让我彻底疯了。我有一个原本工作正常的软件包,然后我重命名了它,现在我无法使用System.out
(或System
类中的任何内容)。就价值而言,这是我的Main
类(为了排除其他可能导致问题的因素,我除了System.out
行以外删除了所有内容)。
package goldminetosugarconvertor;
public class Main
{
public static void main(String[] args)
{
System.out.println("prog init");
}
}
在NetBeans中,
System.out.println
中的 out
被下划线标记为错误的 "cannot find symbol"
,但奇怪的是它显示的位置是 "class goldminetosugarconvertor.System
",这显然是错误的。有什么好的想法吗?我猜当我重命名包时会出现问题,但我只是想不出什么会导致
System
被错误识别。
goldminetosugarconvertor
包中是否有一个名为System的类? - President James K. Polk