code: public static Object concat(Object[] arrs)
      {
          int   totalLen            = 0;
          Class commonComponentType = null;
          for (int i = 0, len = arrs.length; i < len; i++)
          {
              // skip all null arrays
              if (arrs[i] == null)
              {
                  continue;
              }
  
              int arrayLen = Array.getLength(arrs[i]);
  
              // skip all empty arrays
              if (arrayLen == 0)
              {
                  continue;
              }
  
              totalLen += arrayLen;
  
              Class componentType = arrs[i].getClass().getComponentType();
              commonComponentType =
                  (commonComponentType == null) ? componentType
                                                : commonClass(commonComponentType, componentType);
          }
  
          if (commonComponentType == null)
          {
              return null;
          }
  
          return concat(Array.newInstance(commonComponentType, totalLen), totalLen, arrs);
      }
docs: Concatenates arrays into one. Any null or empty arrays are ignored.
  If all arrays are null or empty, returns null.
  Elements will be ordered in the order in which the arrays are supplied.
  
  @param arrs array of arrays
  @return the concatenated array