I am trying to save a .txt file in a res \ raw file in Android Studio and read / analyze the file. I have the file "my_file.txt" in the "raw" folder that I created in the "res" directory (which I did not create).
Here's what I think my main problem is: when creating a File object (for use with a Scanner object), what path should I go for my text file?
Here is my code:
private void readFile(){ Scanner scanner = null; try { scanner = new Scanner(new File("\\res\\raw\\my_file.txt"));
source share