title: How to write multiple lines in a file when this multiple lines take as a input from a JTextarea?
body: <p>I take multiple lines as a input from a JTextarea,
  If I write it in a file, then I get that the multiple lines are write in a one line in file</p>
  <h3>Examples:</h3>
  <p>In JTextArea:</p>
  <pre><code>I
  am
  a
  student
  </code></pre>
  <p>Means: variable.text=&quot;I'\n'am'\n'a'\n'student&quot;;
  When I write the string s in file I get:</p>
  <pre><code>I am a student
  </code></pre>
  <p>But I want that the file will contain the same things as I give as a input means---&gt;</p>
  <pre><code>I
  am
  a
  student
  </code></pre>
  <p>This is the code of writing a file :</p>
  <pre><code>      BufferedWriter out = new BufferedWriter(
         new OutputStreamWriter(
                    new FileOutputStream(file), &quot;UTF16&quot;));
        int size=1;
        for(Tableclass variable:tablevector)
        {
              out.write(variable.Text); 
              out.newLine();
              size++;
  
        }
        out.close();
  </code></pre>