1
I would like to know the difference in these two methods of Writing in files.
Path path = Paths.get("E:/documentos/texte.txt");
Charset utf8 = StandardCharsets.UTF_8;
try(BufferedWriter escrever = Files.newBufferedWriter(path, utf8)) {
escrever.write(" ");
}
East:
File arq = new File("E:/documentos.texte.txt");
FileWriter fw = new FileWriter(arq);
try(BufferedWriter escrever = new BufferedWriter(fw)) {
escrever.write(" ");
}