title: Java: How to write csv file from ArrayList
body: <p>I have an ArrayList (actually an ArrayList of ArrayLists), each with ints, doubles, and Strings. I would like to write these to a csv file.  </p>
  
  <p>It seems that <code>PrintWriter</code> requires the data to be a <code>CharSequence</code>. Alternatively, when I try to use the <code>write()</code> function of <code>BufferedWriter</code>, it requires that I specify the type, e.g. <code>int</code> or <code>String</code>.</p>
  
  <p>Is there a way I can write different types to a csv file? If possible, I would prefer to avoid 3rd-party utilities.</p>