I want to create a .csv file. I am using the following code:
FileWriter fWriter = null;
BufferedWriter writer = null;
try {
fWriter = new FileWriter("fileName.csv");
writer = new BufferedWriter(fWriter);
writer.write("This,line,is,written");
writer.newLine();
writer.close();
} catch (Exception e) {
}
Does it create a new file if it does not exist?
What if file already exists? Does it delete the original file and create a new one?