I take several lines as input from JTextarea. If I write it in a file, I get that several lines are written to one line in the file
Examples:
In JTextArea:
I am a student
Tool: variable.text = "I '\ n'am' \ n'a '\ n'student"; When I write the string s in the file, I get:
I am a student
But I want the file to contain the same things as me, as an input tool --->
I am a student
This is the file write code:
BufferedWriter out = new BufferedWriter( new OutputStreamWriter( new FileOutputStream(file), "UTF16")); int size=1; for(Tableclass variable:tablevector) { out.write(variable.Text); out.newLine(); size++; } out.close();
source share