Question: In Problem 16, you wrote a piece of code that prompted the user for a file name and printed that files contents to the console.
In Problem 16, you wrote a piece of code that prompted the user for a file name and printed that file’s contents to the console. Modify your code so that it will repeatedly prompt the user for the file name until the user types the name of a file that exists on the system.
Data from Problem 16
Write a program that prints itself to the console as output. For example, if the program is stored in Example.java, it will open the file Example.java and print its contents to the console.
Step by Step Solution
3.43 Rating (162 Votes )
There are 3 Steps involved in it
Code that uses getFileName before calling printEntireFile ... View full answer
Get step-by-step solutions from verified subject matter experts
