Guest_imported
New member
- Jan 1, 1970
- 0
Hey everyone,
I have a question regarding error checking with files. In my program, I create the file backUp.html (which I write to)..by doing so:
PrintWriter pw = new PrintWriter(new FileWriter("C:/Windows/Desktop/backUp.html");
However, what if the file backUp.html already exists? I think it would be nice if I could prompt the user and ask him/her if he/she would like to overwrite the file before it automatically does so...!
Is there a way to do this?
Any feedback will be appreciated.
Thanks in advance,
J.Kamdar