If I do this:
File f = new File(\"c:\\\\text.txt\"); if (f.exists()) { System.out.println(\"File exists\"); } else { System.out.println(\"File not f
Creating a File instance does not create a file on the file system, so the posted code will do what you require.
File