File is not a file on your system. new File("MyFile.txt") is creating a new File Object from where you can call various Methods, to create a file on the system, such as .createNewFile(). If your using Sierra & Bates JAVA 5 see page 431, for more details. The example given there is:
Its a simple method for giving feedback on the existence of files, so;
be a well encapsulated person, don't expose your privates, unless you public void getWife()!