Question: Write a method named printEntireFile that prompts the user for a file name and prints the contents of that file to the console as output.

Write a method named printEntireFile that prompts the user for a file name and prints the contents of that file to the console as output. You may assume that the file exists. For example, if the file example.txt contains the following input data: hello how 1 2 3 4 are you I am fine Then the following would be an example dialogue of your method: Type a file name: example.txt hello how are you 1 2 3 4 I am fine Type your solution here: 4 7
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
