In Problem 16, you wrote a piece of code that prompted the user for a file name

Question:

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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: