No, creating a new File object does not create a file in the file system. In particular, you can create File objects that reference paths (and even drives on Windows) that do not exist.
Constructors specify the representation of the base file system, if possible, perform any normalization operations, but this does not require a file. As an example of normalization, consider this code running on Windows:
File f = new File("c:\\a/b\\c/d.txt"); System.out.println(f);
Will print
c:\a\b\c\d.txt
showing that slashes were normalized for backslashes, but the directories a, b, and c do not actually exist. I believe that normalization is more connected with the naming scheme of the operating system, and not with real resources - I do not believe that it even looks at the disk to see if the file exists.
source share