Note that the stack trace contains the line number of the exception, but that line number won't mean anything to
us because we don't have your complete file. We can't tell what the line numbers mean. But if your stack trace starts off with
that tells you to look at ListAllFiles.java, line 42. Tell us which line that is, and we might be able to help.
Also, I don't think this will explain your NullPointerException, but here's another problem:
When you call oneFile.getName(), you get only the name of the file,
not the directory it's in. So the countFilesIn() methods won't be able to find the files, because it doesn't know where they are. I recommend you change the method to take a File parameter rather than a
String - that way the File object still has all the info you need to find the file.