This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I want to create a new file using try checking if the file already exists and then if it exists if should be handled by catch.
I am able to create a new file when I simply give new File(f).createNewFile(); but when I give a directory
new File(f,"C:\\temp").createNewFile(); It throws system cannot find path specified.
Also I dont know how to check if a file already exists