public void populateNotesFromFile()
{
try{
BufferedReader reader = new BufferedReader(new FileReader(DEFAULT_NOTES_SAVED));
String fileNotes = reader.readLine();
while(fileNotes != null){
notes.add(fileNotes);
fileNotes = reader.readLine();
}
reader.close();
}
catch (IOException e){
System.err.println("The desired file " + DEFAULT_NOTES_SAVED + " has problems being read from");
}
catch (FileNotFoundException e){
System.err.println("Unable to open " + DEFAULT_NOTES_SAVED);
}
//make sure we have one note
if (notes.size() == 0){
notes.add("There are no notes stored in your note book");
}
}
每当我编译上面的时候,我都会收到一条消息,说找不到符号类IOException e
有人可以告诉我如何解决它:d
谢谢