When we open a file for appending and the file already exists
A) There is a compiler error
B) There is a runtime error
C) The file contents will be overwritten
D) We will be adding data at the end of the file
1
Expert's answer
2012-12-18T10:08:18-0500
this code appends "row" to a file. parameter "true" in "FileWriter(fileName, append)" constructor provides appending to existing file. if file does not exists, it creates this file.
public void writeIn(File file) throws IOException, ClassNotFoundException { String row="row";
Comments
Leave a comment