Question: You are to write an executable class ( contains a main method ) named FilelO that opens the input file named input.txt and the
You are to write an executable class contains a main method named FilelO that opens the
input file named "input.txt and the output file named "output.txt and passes these file
objects Scanner object first, PrintStream object second to a method named flipLines you will
not write the flipLines method here
In the blanks provided, fill in all necessary statements, methods calls, keywords, and variables
the instantiation of the Scanner and PrintStream require multiple items and in these cases
DO NOT type any spaces EXCEPT after the keyword new:
FilelO
main
theArgs
Scanner inFile null;
PrintStream outFile null;
try
inFile ;
outFile ;
catch
e
System.out.printlnError opening files: e;
flipLines
;
inFile
;
outFile.
;
flipLines goes here. You will complete flipLines in the next question.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
