File f = new File(\"C:\\\\Temp\\\\Example.txt\"); f.createNewFile();
On executing, a new file named \"Example.txt\" will be created in the Temp>
Temp>
Forward slash "/" must be used to get the file path here. Use:
File f = new File("/Users/pavankumar/Desktop/Testing/Java.txt"); f.createNewFile();