The File class probably should be named "Path" or "FilePath". Creating a java.io.File doesn't create a file -- it creates a path that
could refer to a file. Yes, this File object will refer to the file "C:\java\work.txt". The file doesn't necessarily exist unless you force it to exist -- for example, by opening and closing a FileOutputStream with it (which would create a zero-length file
FileOutputStream os = new FileOutputStream(f);
os.close();
Of course, this would destroy the file if it already existed; you could
test for this using f.exists().
[ June 27, 2006: Message edited by: Ernest Friedman-Hill ]