code: public static Object concat(Object arr1, Object arr2)
      {
          int len1 = (arr1 == null) ? (-1) : Array.getLength(arr1);
  
          if (len1 <= 0)
          {
              return arr2;
          }
  
          int len2 = (arr2 == null) ? (-1) : Array.getLength(arr2);
  
          if (len2 <= 0)
          {
              return arr1;
          }
  
          Class  commonComponentType =
              commonClass(arr1.getClass().getComponentType(), arr2.getClass().getComponentType());
          Object newArray = Array.newInstance(commonComponentType, len1 + len2);
          System.arraycopy(arr1, 0, newArray, 0, len1);
          System.arraycopy(arr2, 0, newArray, len1, len2);
  
          return newArray;
      }
docs: Concatenates two arrays into one. If arr1 is null or empty, returns arr2.
  If arr2 is null or empty, returns arr1. May return null if both arrays are null,
  or one is empty and the other null. <br>
  The concatenated array has componentType which is compatible with both input arrays (or Object[])
  
  @param arr1 input array
  @param arr2 input array
  
  @return Object the concatenated array, elements of arr1 first