package p24_pliki;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;

public class Odczyt4_ReadAllLines {

	public static void main(String[] args) {
		try {
			List<String> lines = Files.readAllLines(Paths.get("pliki/pan_tadeusz.txt"));
			System.out.println("Liczba linii: " + lines.size());
			for(String line : lines) {
				System.out.println(line);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
