I'm trying to run this code, but it does not work, the error in try {}, in Java it works perfectly.
public void criatxt(){
String texto = "XXX";
try{
PrintWriter arq = new PrintWriter("meudocumento.txt");
System.out.println("Salvou");
arq.print(texto);
arq.close();
}
catch(Exception er){
er.printStackTrace();
System.out.println("Salvou: "+ er.getStackTrace());
}
}
The error in Exception is this: Ljava.lang.StackTraceElemente; @xxxxxxx