estou com duvida da sequencia de execução desse código: 1- bw.write("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod "); 2-bw executa o metodo :BufferedWriter bw = new BufferedWriter(osw); 3-(osw) chama o metodo:Writer osw = new OutputStreamWriter(fos); 4-(fos) chama e executa o metodo:OutputStream fos = new FileOutputStream("lorem2.txt");
seria essa sequencia do código?
OutputStream fos = new FileOutputStream("lorem2.txt");
Writer osw = new OutputStreamWriter(fos);
BufferedWriter bw = new BufferedWriter(osw);
bw.write("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod ");
bw.newLine();
bw.newLine();
bw.write("por que tocou a campainha");
bw.close();
`