Do FileWriter objects create a file if the specified file does not exist? The API
doc says it throws an IOException, but when I tried it (using the FileWriter(
String fileName) constructor) it created a file! What's up with that!?
FileWriter
public FileWriter(String fileName)
throws IOException
Constructs a FileWriter object given a file name.
Parameters:
fileName - String The system-dependent filename.
Throws:
IOException - if the specified file is not found or if some other I/O error occurs.