I'm doing an assignment where I'm supposed to work with a file. The tester uses the command argument
"java puzzle < sample_input_1.txt"
to run the file with my program. My program being "puzzle" and the file being "sample_input_1.txt".
I've been searching a bit, but i'm not quite sure how to retrieve the data from this file. I'm used to getting the filepath as an argument to main, which I use a scanner to read.
How do I access this file when programming and retrieving it's data? I would like to do something like what a scanner does to read it.
Thanks guys!