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.
What will be an ideal response?
See the code in FileCopier.java.
You might also like to view...
Which of the following statements is true?
a. In order to lease cloud-based IT resources, a cloud consumer’s up-front investment costs must increase when compared to the up-front costs required to purchase the same IT resources as part of an on-premise environment. b. A required characteristic of on-premise environments is that they are resilient so as to provide high availability and reliability. This allows an on-premise SaaS product to be widely accessible by multiple cloud service consumers. c. When leasing IT resources provided by a public cloud, cloud consumers are required to pay only for the amount of actual usage. d. None of the above
By default, every port on a switch is in VLAN 1. This is the ____ VLAN.
A. root B. domain C. management D. switch