import java.io.*;public class Ex9a{
public void rollBack(BufferedReader in) throws IOException{
String line="";
if((line=in.readLine())!=null){
rollBack(in);
}
if(line!=null&&!"".equals(line)){ System.out.println(line);
}
}
public static void main(String[] args) throws FileNotFoundException{
PrintStream out;
Ex9a t=new Ex9a();
out = new PrintStream(new FileOutputStream("outfile.txt"));
out.println(ioe);
out.close( );
String fileName="infile.txt";
try{
BufferedReader in=new BufferedReader(new FileReader(fileName));
t.rollBack(in);
}catch(IOException ioe){
System.out.println(ioe);
}
}
}
infile is basically a bunch of lines of a poem and I need to reverse these lines and output them into an out file. The output file is created but it has nothing in it. Please help.