I get an error - "missing return statement" - on line 26, which in this case is the last curly bracket in the code. I know that it literally means that I have to return somewhere in the method (can you call it function?), but I'm not sure where - nor why. Here's the code:
public String[] OpenFile() throws IOException {
Map<String, Double> map = new HashMap();
FileReader fr = new FileReader("money.txt");
BufferedReader br = new BufferedReader(fr);
try{
while (br.ready()){
String str = br.readLine();
String[] list = str.split(" ");
System.out.println(list);
}
} catch (IOException e){
System.err.println("Error - IOException!");
}
}