Question: Modify the PrintInitials program so that it takes input from the keyboard but prints output to a file named output.txt. Use these suggestions: Add import
Modify the PrintInitials program so that it takes input from the keyboard but prints output to a file named output.txt. Use these suggestions:

Add import java.io. PrintWriter; Append throws Exception to the main method header. Add this declaration: PrintWriter fileOut = new PrintWriter("output.txt"); Substitute fileOut.println for System.out.println. Then add this final statement to the main method: fileOut.close();
Step by Step Solution
3.43 Rating (150 Votes )
There are 3 Steps involved in it
Heres the modified PrintInitials program according to your suggestions import javaioPri... View full answer
Get step-by-step solutions from verified subject matter experts
