code: public void setLastPoint(double x, double y, double z) {
  		if (this.numCoords>=3) {
  			this.coords[this.numCoords-3] = x;
  			this.coords[this.numCoords-2] = y;
  			this.coords[this.numCoords-1] = z;
  			this.graphicalBounds = null;
  			this.logicalBounds = null;
  		}
  	}
docs: Change the coordinates of the last inserted point.
  
  @param x
  @param y
  @param z