The File class lets you create new directories and new files on a file system.
The methods to accomplish this are:
public boolean createNewFile() throws IOException
-and-
public boolean mkdir()
How does the operation of creating a new file potentially lead to an IOException being thrown but the operation of creating a new directory does not?
I'm trained as a Java developer to be very aware of operations that throw checked exceptions, so I would be expecting more consistency here unless there was a very good reason for the lack of consistency. Both methods return true if the operation succeeded.