public static final int START_X = 200;
public static final int START_Y = 200; //这里提示:Multiple markers at this line- Syntax error on token ";", { expected after this token
try{
FileReader in = new FileReader("D:\test.txt");
}catch(FileNotFoundException e){
e.printStackTrace();
}
错误是加了try~catch后出现的 括号检查过了 没问题啊
------解决方案--------------------
养成一个好的习惯,建议使用FileReader(File file) 此构造方法,路径就会提示错误了~
------解决方案--------------------
这是运行时才会提示的错误,撸主在编译期就过不了
撸主把try-catch放到static{}中
------解决方案--------------------
哦 难道说楼主没把try catch放在方法里面? 或者没用静态块?