The Java.iO.File document says the following words about its constructor which takes the pathname
:
public File(String pathname)
Creates a new File instance by converting the given pathname string into an abstract pathname. If the given string is the empty string, then the result is the empty abstract pathname.
But what if the pathname
points to a file which is already existing?
File file = new File(PATH_TO_AN_EXISTING_FILE);
Does the above file
instance represent a fresh new file (with the existing one be deleted?) Or does it represent the existing file ?