Need help with this..i was trying to convert Object type array to String type array by the below code:
Object matNodes[] = null;
Iterable<Vertex> 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]);
But getting below exception..
Exception in thread "main" java.lang.ArrayStoreException
at java.lang.System.arraycopy(Native Method)
at java.util.Arrays$ArrayList.toArray(Unknown Source)
Anyone please guide me to resolve this.