The first thing to note when dealing with files and directories in Java is that both files and directories are objects of type file. Don't look for java.io.Directory, cuz it doesn't exist.
The other confusing thing about working with files in Java is that when you create a new object of type java.io.File, you do not actually create a physical file on the file system. You have only created an object that can be used as a file. There are many classes and methods useful for doing this, which we'll look at in a moment, after we get used to dealing with File objects.
There are a number of fields in the java.io.File class that are useful when working with files and directories:
static String pathSeparator The system-dependent ...