I was wondering how to specifiy a relative path name to a text file that is stored in my src folder of a java project. I would like to store a string with the path of this
Use the src/ prefix before the file path/name.
src/
String path = "src/data.txt";