code: @SafeVarargs
      public static <T> T[] concat(T[] first, T[]... rest) {
          int length = first.length;
          for (T[] array : rest) {
              length += array.length;
          }
          T[] result = Arrays.copyOf(first, length);
          int offset = first.length;
          for (T[] array : rest) {
              System.arraycopy(array, 0, result, offset, array.length);
              offset += array.length;
          }
          return result;
      }
docs: Concatenates several reference arrays.
  
  @param <T> the type of the elements in the array
  @param first the first array
  @param rest the rest of the arrays
  @return a single array containing all elements in all arrays