title: Java convert Arraylist<Float> to float[]
body: <p>How I can do that?</p>
  
  <p>I have an arraylist, with float elements. <code>(Arraylist &lt;Float&gt;)</code></p>
  
  <pre><code>(float[]) Floats_arraylist.toArray()
  </code></pre>
  
  <p>it is not working. </p>
  
  <blockquote>
    <p>cannot cast from Object[] to float[]</p>
  </blockquote>