title: Save an ArrayList to File on android
body: <p>I have an ArrayList full of strings that the user populated it with to use in a different activity in a ListView to view the strings they have saved. 
  I want the ArrayList they populated to be saved but I am so lost on how to get it to work. I've tried FileOutputStream, SharedPreferences. I looked at many examples.</p>
  
  <p>for example i have </p>
  
  <pre><code>ArrayList&lt;String&gt; give = new ArrayList&lt;String&gt;();
  </code></pre>
  
  <p>and to save the arraylist ive tried stuff like</p>
  
  <pre><code>FileOutputStream fos = openFileOutput(MYFILENAME, Context.MODE_PRIVATE);
  fos.write(give.getBytes());
  fos.close();
  </code></pre>
  
  <p>but this does not work at all</p>