I am trying to unpack an array I obtain from reflecting an objects fields. I set the value of the general field to an Object. If it is an Array I then want to cast my genera
The only parent class of all arrays is Object.
To extract the values of an array as an Object[] you can use.
Object[]
public static Object[] unpack(Object array) { Object[] array2 = new Object[Array.getLength(array)]; for(int i=0;i