I have no idea where the current directory is for a program executing in an IDE.
Did you try this:
Create a File object with the filename you want to use and then print out the File object's...
Type: Posts; User: Norm
I have no idea where the current directory is for a program executing in an IDE.
Did you try this:
Create a File object with the filename you want to use and then print out the File object's...
How are you running the program? IDE's mess up what you might think about where files are.
Create a File object with the filename you want to use and then print out the File object's absolute path...
Use the File constructor with only the filename
"C://Users/Xrrak"
try removing the extra /
"C:/Users/Xrrak"
When you look at paths on your OS, what is shown, say in Windows Explorer? That is what you need to use. Something like this:
E:\\Backups
You need two \s because the \ is a special character...
There are lots of sample programs here on the forum. Do a Search here for Scanner.
For reading text the Scanner class is one easy way. It has methods to detect if there is more input that could be used to control a loop where you read each line and put it into an array.