Java how to read file line by line

Java how to read file line by line
refer t‮al:o‬utturi.com
/**
 * @author lautturi.com 
 * Java example:  how to read textfile line by line in java
 */

import java.util.*;
import java.io.*;

public class Lautturi {
    
	public static void main(String[] args) {
		BufferedReader reader;
		try {
			reader = new BufferedReader(new FileReader(
					"test.txt"));
			String line = null;
			while ((line = reader.readLine()) != null) {
				System.out.println(line);
			}
			reader.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
Created Time:2017-10-07 11:53:12  Author:lautturi