save text to file

Asked

Viewed 33 times

0

I’m using this code to record to the archive:

try(BufferedWriter bw = Files.newBufferedWriter(caminho, formato)){

            bw.write("frase teste\n");
            bw.write("outra coisa");

        }catch(IOException e) {
            e.printStackTrace();
        }

But he doesn’t recognize the character. How do I solve?

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.