title: Having problems w/ Arraylist.toArray
body: <p>So, here are the 2 code snippets involved:</p>
  
  <p>Declaration of arraylist in question:</p>
  
  <pre><code>static ArrayList&lt;byte[]&gt; photolist;
  </code></pre>
  
  <p>Array in question:</p>
  
  <pre><code>byte[] phofin = new byte[x];
  </code></pre>
  
  <p>Conversion(source of bug):</p>
  
  <pre><code>PhotoRetrieve.photolist.toArray(phofin);
  </code></pre>
  
  <p>The error message it's giving me says:</p>
  
  <pre><code>The method toArray(T[]) in the type ArrayList&lt;byte[]&gt; is not applicable for the arguments (byte[])
  </code></pre>
  
  <p>However, on this <a href="https://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html#toArray()" rel="nofollow noreferrer">java docs page</a>: </p>
  
  <p>There is an overload of .toarray that accepts an array as a parameter. I've tried lots of things to solve this issue, and have had no success, possibly because I'm new to Java and not the best @ troubleshooting. All responses are welcome. Thanks! </p>
  
  <p>UPDATE:
  In the declaration, when I try to change the type to byte, I get this error:</p>
  
  <p>Syntax error, insert "Dimensions" to complete ReferenceType</p>