When using an array of objects, the data returned from the function must be cast to the object array’s data type.
For example: SomeClass[] items = (SomeClass[]) concat(array1, array2);.
If you dislike using the (cast) operator for concat() I can write for you a version that doesn’t need it like I did for append():