I am just wondering if it is possible to open a text file without having a specific file path. By that I mean, I would like to have a Java program in a folder that reads text files using the scanner. I would also like to have different text files in the same folder. So, to really make it clear I want to have these example files inside the same folder:
Example1.txt
Example2.txt
Example3.txt
ProgramThatReadsTextFiles.java
I then want to be able to send this folder to someone else, hence why I can't use a file path that only works on my computer. Every example I have seen uses a path to find the file such as "C:\User\....etc" but I would like to read from the same folder. Is this possible?
Thank you for your time.