Write only takes string where as append takes char sequence which can be null
So with write I can't use null Strings but with append I can do it instead, right?
And here I thought write() flashes the file and puts in data afresh while append() adds data to the end of the file.
And append uses method chaining like:- class FileWriter{ FileWriter append(..){ … return this; } } So that you can use it like FileWriter.append(abc).append(xyz)…
Kinda like the append of stringbuilder
I don’t remember it’s been a while since I used if but I think it adds the data
Обсуждают сегодня