static int countEvenOdd ( int n ) {
  int even_count = 0 ;
  int odd_count = 0 ;
  while ( n > 0 ) {
    int rem = n % 10 ;
    if ( rem % 2 == 0 ) even_count ++ ;
    else odd_count ++ ;
    n = n / 10 ;
  }
  System . out . println ( "Even count : " + even_count ) ;
  System . out . println ( "Odd count : " + odd_count ) ;
  if ( even_count % 2 == 0 && odd_count % 2 != 0 ) return 1 ;
  else return 0 ;
}

static int countEvenOdd ( int n ) { int even_count = 0 ; int odd_count = 0 ; while ( n > 0 ) { int rem = n % 10 ; if ( rem % 2 == 0 ) even_count ++ ; else odd_count ++ ; n = n / 10 ; } System . out . println ( " Even ▁ count ▁ : ▁ " + even_count ) ; System . out . println ( " Odd ▁ count ▁ : ▁ " + odd_count ) ; if ( even_count % 2 == 0 && odd_count % 2 != 0 ) return 1 ; else return 0 ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (expression_statement (update_expression (identifier))) alternative: (expression_statement (update_expression (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (string_literal) right: (identifier))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (string_literal) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)))) consequence: (return_statement (decimal_integer_literal)) alternative: (return_statement (decimal_integer_literal)))))