package alx.p42_tekstowe;

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

public class Odczyt4_Scanner_Linie {

    public static void main(String[] args) {
        try(Scanner sc = new Scanner(new File("pan-tadeusz.txt"))) {
            while(sc.hasNextLine()) {
                String linia = sc.nextLine();
                System.out.println("[" + linia + "]");
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
