How to serialize ArrayList of float arrays <p>I have an ArrayList, and each object consists of an array of two floats representing coordinates. I found that I could serialize the ArrayList by calling the .toString() method on it, but this did not serialize the float arrays within the ArrayList. How can I go about serializing those as well?</p> <p>Here is basically what I did:</p> <pre><code>private ArrayList&lt;float[]&gt; pointsList = new ArrayList&lt;float[]&gt;(); </code></pre> <p>In an onTouch method, I add coordinates to the list:</p> <pre><code>float[] thisPosition = new float[2]; thisPosition[0] = touchX; thisPosition[1] = touchY; pointsList.add(thisPosition); </code></pre> <p>Then I serialize the ArrayList like this:</p> <p>pointsList.toString();</p> <p>But each item in the list is turned into F@426d51d8 and other strings like that. How can I serialize these sub-arrays and preserve their numeric values? I have searched forums here on StackOverflow and elsewhere, but other similar questions address how to make an ArrayList of String arrays or other ArrayLists.</p>