title: Convert a double array to Double ArrayList
body: <p>When I try to convert a double array to a Double arrayList I got the following error:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.ClassCastException: [D cannot be cast to java.lang.Double</p>
  </blockquote>
  
  <p>Below is my code.</p>
  
  <pre><code>double [] firstValueArray ;
  </code></pre>
  
  <p><code>ArrayList   &lt;Double&gt; firstValueList = new ArrayList (Arrays.asList(firstValueArray));</code></p>
  
  <p>I am comparing this list with another list and assign the result to another double variable.</p>
  
  <p>Please let me know the reason for this error.</p>