Java - FilenotfoundException for reading text file

前端 未结 4 1254
一个人的身影
一个人的身影 2021-01-28 07:08

by running this...

File file = new File(\"Highscores.scr\");

i keep getting this error, and i really don\'t know how to get around it. the fil

4条回答
  •  南笙
    南笙 (楼主)
    2021-01-28 07:32

    You can try to run the following sample program to check which is the current directory your program is picking up.

    File f = new File(".");
    System.out.println("Current Directory is: " + f.getAbsolutePath());
    

提交回复
热议问题