code: public static <T> T[] init(T[] self) {
          if (self.length == 0) {
              throw new NoSuchElementException("Cannot access init() for an empty Object array");
          }
          T[] result = createSimilarArray(self, self.length - 1);
          System.arraycopy(self, 0, result, 0, self.length - 1);
          return result;
      }
docs: Returns the items from the Object array excluding the last item.
  <pre class="groovyTestCase">
  String[] strings = ["a", "b", "c"]
  def result = strings.init()
  assert result.length == 2
  assert strings.class.componentType == String
  </pre>
  
  @param self an array
  @return an array without its last element
  @throws NoSuchElementException if the array is empty and you try to access the init() item.
  @since 2.4.0