Question: This program is expected to read from a file called Input.txt, that contains three lines of text and displays them. These lines are: This is

 This program is expected to read from a file called "Input.txt",

This program is expected to read from a file called "Input.txt", that contains three lines of text and displays them. These lines are: This is the first line This is the second line This is the third line Unfortunately, it does not work. Debug the program and rewrite the correct code. import java.util.. import java.io. public class readFile{ public static void main(String args) { Scanner input - new Scanner("Input.txt"); while (input hasNextLine()){ String line- input.next(); System.out.println(line): 3 Edit View Insert Format Tools Table

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!