package alx.p42_tekstowe;

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

public class Odczyt5_Scanner_Slowa_v1 {

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