code: public static Object remove (Object[] list, int index)
      {
          if (list == null) {
              return null;
          }
  
          int llength = list.length;
          if (llength <= index || index < 0) {
              return null;
          }
  
          Object elem = list[index];
          System.arraycopy(list, index+1, list, index, llength-(index+1));
          list[llength-1] = null;
          return elem;
      }
docs: Removes the element at the specified index. The elements after the
  removed element will be slid down the array one spot to fill the
  place of the removed element. If a null array is supplied or one
  that is not large enough to accomodate this index, null is
  returned.
  
  @return the object that was removed from the array or null if no
  object existed at that location.