Answer the question
In order to leave comments, you need to log in
Is it possible to write data to a file from a new line?
By default, Java will write information to the file on one line. In theory, if you enter \n into a variable, then the subsequent test will be written from a new line. But this rule had no effect on writing to the file, and as a result String test = "First line \n Second line" will be written to the file "First line Second line". What would you recommend for a line break?
Answer the question
In order to leave comments, you need to log in
I advise you to find a mistake, since everything works fine, you can write rn and not n if your editor does not see the line feed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question