changing writing and scanning location
hi. im trying to make a program that takes a text file with multiple words such as;
then i want to compare the first word to the second word and output the one that comes first into a temperary text file. after all the words are in the temperary text file i want to change the reading location of the scanner from the original file to the temp file and change the writing location from the temp file to the original, and repeat the process.
can someone tell me how i change the reading and writing locations in java.
do i have to make a new printWriter and scanner or can i just change the location of where they are looking.