static void removeChar ( String s , char c ) {
  int j , count = 0 , n = s . length ( ) ;
  char [ ] t = s . toCharArray ( ) ;
  for ( int i = j = 0 ;
  i < n ;
  i ++ ) {
    if ( t [ i ] != c ) t [ j ++ ] = t [ i ] ;
    else count ++ ;
  }
  while ( count > 0 ) {
    t [ j ++ ] = '\0' ;
    count -- ;
  }
  System . out . println ( t ) ;
}

static void removeChar ( String s , char c ) { int j , count = 0 , n = s . length ( ) ; char [ ] t = s . toCharArray ( ) ; for ( int i = j = 0 ; i < n ; i ++ ) { if ( t [ i ] != c ) t [ j ++ ] = t [ i ] ; else count ++ ; } while ( count > 0 ) { t [ j ++ ] = ' \0' ; count -- ; } System . out . println ( t ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (assignment_expression left: (identifier) right: (decimal_integer_literal)))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))) consequence: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (update_expression (identifier))) right: (array_access array: (identifier) index: (identifier)))) alternative: (expression_statement (update_expression (identifier)))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (update_expression (identifier))) right: (character_literal))) (expression_statement (update_expression (identifier))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))