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 somewh
public String[] OpenFile() // expected return type is String array
But you didn't return that from your method.
If you don't want to return that change your method return type to void
(no return)
public void OpenFile() throws IOException {
}
Or if you want to return as expected use
public String[] OpenFile() throws IOException {
String[] arr=new String[5];
// implementation
return arr;
}