我不知道爲什麼它給這個錯誤。大括號似乎是正確的。另一件事是,相同的程序在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();
}
}
正常工作 –
什麼行號? –
@Ed Staub Line 30 – Ava