I have a file named \"word.txt
\".
It is in the same directory as my java
file.
But when I try to access it in the following code th
I have the same problem, but you know why? because I didn't put .txt in the end of my File and so it was File not a textFile, you shoud do just two things: