【发布时间】:2011-10-31 01:23:20
【问题描述】:
我不确定为什么会出现此错误。大括号似乎是正确的。另一件事是相同的程序在 Windows-eclipse 中有效,但在 Mac 的 eclipse 中无效。可能是什么原因?
import java.util.Vector;
public class Debug
{
private int something = 0;
private Vector list = new Vector();
public void firstMethod()
{
thirdMethod(something);
something = something + 1;
}
public void secondMethod()
{
thirdMethod(something);
something = something + 2;
}
public void thirdMethod(int value)
{
something = something + value;
}
public static void main(String[] args)
{
Debug debug = new Debug();
debug.firstMethod();
debug.secondMethod();
}
}
【问题讨论】:
-
@Richa 你的代码只有 29 行
标签: java eclipse macos syntax-error