Consider the code:
File file = new File(\"c:\\\\temp\\\\java\\\\testfile\");
testfile is a file, and it may or may not exist.
testfile
I found this more useful for getting the absolute file location.
File file = new File("\\TestHello\\test.txt"); System.out.println(file.getAbsoluteFile());