null pointer exception
hi am getting null pointer exception in my code,
can anybody explain as why,
try{
FileReader fread =new FileReader("DIS.txt");
BufferedReader bread =new BufferedReader(fread);
int i=0;
do{
text = bread.readLine();
val[i] = text;
i++;
}while(text !=null);
bread.close();
System.out.println("raech");
for(int j=0;j<3900;j++){
System.out.println("value is"+val[i] );
}
}catch(Exception e){
e.printStackTrace();
// System.out.println ("IO exception =" + e );
}

