Question: Write a program that will make a copy of a text file, line by line. Read the name of the existing file and the name
Write a program that will make a copy of a text file, line by line. Read the name of the existing file and the name of the new file—the copy—from the keyboard. Use the methods of the class File to test whether the original file exists and can be read. If not, display an error message and abort the program. Similarly, see whether the name of the new file already exists. If so, display a warning message and allow the user to either abort the program, overwrite the existing file, or enter a new name for the file.
Step by Step Solution
3.52 Rating (166 Votes )
There are 3 Steps involved in it
public class FileCopier param args the command line arguments public static void mainString args Sca... View full answer
Get step-by-step solutions from verified subject matter experts
