title: The method toArray(T[]) in the type ArrayList<Boolean> is not applicable for the arguments (boolean[])
body: <p>I write a function to get <code>boolean</code> array,  from <code>arraylist&lt;boolean&gt;</code> to <code>boolean</code> array
  but I get the error:</p>
  
  <blockquote>
    <p>The method toArray(T[]) in the type ArrayList is not applicable for the arguments (boolean[])</p>
  </blockquote>
  
  <pre><code>ArrayList&lt;Boolean&gt; fool = new ArrayList&lt;Boolean&gt;();
  
  for (int i = 0; i &lt; o.length(); i++) {
      if (Integer.parseInt(o.substring(i, i + 1)) == 1) {
          fool.add(true);
      } else {
          fool.add(false);
      }
  }
  
  boolean[] op = fool.toArray(new boolean[fool.size()]);
  </code></pre>
  
  <p>if I change the type <code>boolean[]op</code> to <code>Boolean[]op</code>, that is work, but I need <code>boolean[]</code>..</p>
  
  <p>So how can i get the <code>boolean</code> array?</p>