I am writing a DemoApp (mobile application) using Java in Android Studio. I am trying to read a comma separated text file using BufferedReader
class. The operating system is Windows 10.
I have C:\
and D:\
drives on the laptop and I tried to move around the file from C:\
to D:\
to make it work but it did not.
Android studio is installed onD:\
The file path in both the cases is verified and correct.
The user.dir
system property value is \.
If I try to use drive letter in the path, the absolute path becomes something like \C:/Users/currencies.txt.
Therefore, I have dropped a drive letter.
I tried using both forward and backward slashes but the result is same.
Can someone help me understand how can I get rid off NoFileFoundException
?
The following is the piece of code for both the methods we tried