I am having a hard time understanding how reading file works in java. Now, I know how to write a code that reads a text file. Here is what I have.
BufferedReader file = new BufferedReader(new FileReader("/PATH_TO_THE_FILE"));
And this works very well.
Let's say "/PATH_TO_THE_FILE"
is very specific to my computer. maybe it uses folder names that are different from other people, which also means this path is only valid on my computer, right?
In this case, what would happen if I (sender) zip this java and the text file together and send it to another person? My guess is that it won't work unless the receiver changes "/PATH_TO_THE_FILE"
from the java file since it is written to work on the sender's computer.
I am not sure if my explanation is clear. Please let me know so I can make better edits!
Thanks