为什么会出现 java heap space异常
import *;import java.util.*;
public class T2{
public static void main(String[] args)throws Exception{
BufferedReader b1=new BufferedReader(new FileReader("./T2.java"));
List<String> lk=new LinkedList<String>();
String str=b1.readLine();
while(str!=null){
lk.add(str);
b1.readLine();
}
ListIterator<String> lit=lk.listIterator(lk.size());
while(lit.hasPrevious()){
System.out.println("|-"+lit.previous());
}
}
}