Question: Create a class CopyFile having main method. Provide source file and destination file names as command line arguments. Perform following functionality: Program should copy contents
Create a class CopyFile having main method. Provide source file and destination file
names as command line arguments. Perform following functionality:
Program should copy contents of source file to destination file
If source file does not exist, display appropriate error message
If destination file does not exist, it should be created.
If destination file already exist, program should ask Want to Overwrite? yesno If
user selects Yes then overwrite otherwise do not overwrite
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
