The File class contains methods applicable only to directories, and simply returns null for regular files. Why aren't they defined as separate classes sharing an abstract parent?
No one has answered this question yet.
See related questions: