package ch07; import java.io.*; import java.util.Iterator; import java.util.LinkedList; import java.util.ListIterator; public class Read { public static void main(String[] args)throws IOException { BufferedReader in = new BufferedReader(new FileReader("src/io/Alien.java")); LinkedList<String> list = new LinkedList<String>(); String s; StringBuilder sd = new StringBuilder(); while(in.ready()) { s=in.readLine(); list.add(s); } ListIterator<String> it = list.listIterator(list.size()); while(it.hasPrevious()) System.out.println(it.previous()); } }