I am trying to copy a new array at the end of the one i have, but it keeps saying ArrayStoreException in the System.arraycopy and i dont know why, it should have space and everything.
this is the code:
objectzombie=zombieParser(result); /*give a 4 object array*/
GameObjectList arrayt= new GameObjectList(objectzombie.size()+this.objectlist.size());
System.arraycopy(objectzombie, 0, arrayt, 0, objectzombie.size());
System.arraycopy(this.objectlist, 0, arrayt, arrayt.size(),
this.objectlist.size());
this.objectlist=arrayt;}
thank you for your help;
EDIT-------------
It looks like, i can't use the arraycopy if i don´t have a primitive array, how can i then combine my two lists? i don't know how could i do it.