title: Exception in thread "main" java.lang.ArrayStoreException
body: <p>Need help with this..i was trying to convert Object type array to String type array by the below code:</p>
  
  <pre><code>Object matNodes[] = null;
  Iterable&lt;Vertex&gt; vertex = tb.printNodes();
  Iterator itr = vertex.iterator();
  if(vertex.iterator().hasNext()){
      matNodes = IteratorUtils.toArray(itr);
  }
  String[] stringArray = Arrays.asList(matNodes).toArray(new String[matNodes.length]);
  </code></pre>
  
  <p>But getting below exception..</p>
  
  <pre><code>Exception in thread "main" java.lang.ArrayStoreException
  at java.lang.System.arraycopy(Native Method)
  at java.util.Arrays$ArrayList.toArray(Unknown Source)
  </code></pre>
  
  <p>Anyone please guide me to resolve this.</p>