Java Arraylist Toarray Mankatch

MyClass[] array = arrayList.toArray(new MyClass[arrayList.size()]);