我运行方法
MyObject[] myObjects = append(MyObject.class, myObjectCurrentArray, append1, append2, append3);
public static final <T> T [] append(Class T, T[] array, T... appendThese){
T[] newArray = new Object[array.length + appendThese.length];
//put T[] array and T...appendThese into newArray
return newArray;
}
这会抛出异常
java.lang.ClassCastException:[Ljava.lang.Object;无法转换为[Lxxx.MyObject;
我该如何解决这个问题?