code: public static void runExample(
        AdWordsServicesInterface adWordsServices, AdWordsSession session, long adGroupId,
        long criterionId) throws RemoteException {
      // Get the AdGroupCriterionService.
      AdGroupCriterionServiceInterface adGroupCriterionService =
          adWordsServices.get(session, AdGroupCriterionServiceInterface.class);
  
      // Create base class criterion to avoid setting keyword specific fields.
      Criterion criterion = new Criterion();
      criterion.setId(criterionId);
  
      // Create ad group criterion.
      AdGroupCriterion adGroupCriterion = new AdGroupCriterion();
      adGroupCriterion.setAdGroupId(adGroupId);
      adGroupCriterion.setCriterion(criterion);
  
      // Create operations.
      AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
      operation.setOperand(adGroupCriterion);
      operation.setOperator(Operator.REMOVE);
  
      AdGroupCriterionOperation[] operations = new AdGroupCriterionOperation[] {operation};
  
      // Remove ad group criteria.
      AdGroupCriterionReturnValue result = adGroupCriterionService.mutate(operations);
  
      // Display ad group criteria.
      for (AdGroupCriterion adGroupCriterionResult : result.getValue()) {
        System.out.printf("Ad group criterion with ad group ID %d, criterion ID %d, and type "
            + "'%s' was removed.%n", adGroupCriterionResult.getAdGroupId(),
            adGroupCriterionResult.getCriterion().getId(),
            adGroupCriterionResult.getCriterion().getCriterionType());
      }
    }
docs: Runs the example.
  
  @param adWordsServices the services factory.
  @param session the session.
  @param adGroupId the ID of the ad group for the keyword criterion.
  @param criterionId the ID of the keyword criterion to remove.
  @throws ApiException if the API request failed with one or more service errors.
  @throws RemoteException if the API request failed due to other errors.