Java says FileNotFoundException but file exists

前端 未结 10 1375
遇见更好的自我
遇见更好的自我 2020-11-22 10:19

I have an assignment for my CS class where it says to read a file with several test scores and asks me to sum and average them. While summing and averaging is easy, I am hav

10条回答
  •  长发绾君心
    2020-11-22 10:41

    Apart from all the other answers mentioned here, you can do one thing which worked for me.

    If you are reading the path through Scanner or through command line args, instead of copy pasting the path directly from Windows Explorer just manually type in the path.

    It worked for me, hope it helps someone :)

提交回复
热议问题