Hi guys
Just wondering, anyone know how I could cast an Object to my Bean?
I have an ArrayList that I want to convert into an Array of beans, but the .toArray() method returns type Object. If I try to cast this:
MyBean[] myBean = (MyBean[])myArrayList.toArray();
I just get the following:
Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lcom.project.MyBean;
Cheers