public JsonElement remove(int index){
  return elements.remove(index);
}

public JsonElement remove ( int index ) { return elements . remove ( index ) ; }
removes the element at the specified position in this array . shifts any subsequent elements to the left ( subtracts one from their indices ) . returns the element that was removed from the array .
