Java Arraylist toarray niedopasowanie MyClass[] array = arrayList.toArray(new MyClass[arrayList.size()]);