求救:JSP数组问题
String[] file;
String temp=null;
int n=0;
BufferedReader in=new BufferedReader(new FileReader("d://tomcat/webapps/root/hello.txt"));
temp=null;
while((temp=in.readLine())!=null)
{
file[n]=temp;
n++;
}
in.close();
out.flush();
结果报这个错:Generated servlet error:
D:\tomcat\work\Catalina\localhost\_\org\apache\jsp\a_jsp.java:87: variable file might not have been initialized
file[n]=temp;