With this code you can read a file line by line using the Scanner class.


import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class ScannerReadFile {...