title: Using Arrays.asList to create List from Array
body: <p><a href="https://stackoverflow.com/questions/157944/create-arraylist-arraylistt-from-array-t">This post</a> shows that the code below creates a <code>List</code> from an array.</p>
  
  <pre><code>double[] features = new double[19];
  List&lt;Double&gt; list = new ArrayList(Arrays.asList(features));
  </code></pre>
  
  <p>I'm expecting <code>list</code> to contain 19 elements, each of which is 0.0. However, after running the code above, <code>list</code> only contains 1 element, which is <code>[0.0, 0.0, ..., 0.0]</code>. I'm running Java 6 and not sure if this is related.</p>