How to open a text file?
I can't figure out for the life of me what is wrong with this program.
import java.io.*;
public class EncyptionAssignment {
public static void main (String[] args) throws IOException
{
String line;
BufferedReader in;
in = new BufferedReader(new FileReader("notepad encypt.me.txt"));
line = in.readLine();
while(line != null)
{
System.out.println(line);
line = in.readLine();
}
System.out.println(line);
}
}
The error message says that the file can't be found but, I know that the
file already exists. Do I have to save the file in a special folder?
Thanks in advanced!
No comments:
Post a Comment