title: How to add new line on the text file in android
body: <p>I am writing the data on the file and i am using <code>ArrayList</code> for it but my main problem is that how can i add the new line on the text file. Is it possible to do it.</p>
  
  <p>In a such a way that when first data of <code>ArrayList</code> write on the text file than automatically in the new line next data of <code>ArrayList</code> should be write</p>
  
  <pre><code> final String FILES = "/MY_FILE_FOLDER";
  
   String path= Environment.getExternalStorageDirectory().getPath()+FILES; // Folder path
  
   File folderFile = new File(path);
    if (!folderFile.exists()) {
      folderFile.mkdirs();
     }
  
   File myFile = new File(folderFile, fileName+".doc");
   myFile.createNewFile();
  
   FileOutputStream fOut = new FileOutputStream(myFile);
   OutputStreamWriter myOutWriter = new OutputStreamWriter(fOut);
  
   for (int i = 0; i &lt; getdata.size(); i++) {
      myOutWriter.append(getdata.get(i)); 
   }
  
  
   myOutWriter.close();
   fOut.close();
   Toast.makeText(getBaseContext(),
          "Done writing SD 'mysdfile.txt'",
          Toast.LENGTH_SHORT).show();
  </code></pre>