1
I have an excerpt of code that writes in TXT, it works but excludes what was written before, how do I make it nay replace what was already written?
Follow the excerpt of the code I’m using:
public class TestandoEscrita {
public static void main(String[] args) throws FileNotFoundException {
PrintStream out = new PrintStream("c:/EscritaUrna.txt");
Locale locale = new Locale("pt","BR");
GregorianCalendar calendar = new GregorianCalendar();
out.println("Voto Computado Dia");
SimpleDateFormat formatador = new SimpleDateFormat("dd' de 'MMMMM' de 'yyyy' - 'HH':'mm'h'",locale);
out.println(formatador.format(calendar.getTime()));
out.close();
}
}