Either make the String array as a member of ReadFile or make the method isReadFile static. Anyways, if your code looks the same way as you have posted, you are missing the invocation of isReadFile in main() which actually initializes the two dimensional String array.
If all you need to do is to read the contents of the file once, there is no need to maintain static member variables or impart any state to the ReadFile class; just make it a utility method and you should be good to go.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
Offline 8,871 posts
since Jun 2006