static int isPalindrome ( int n ) {
  int divide = ( isOctal ( n ) == 0 ) ? 8 : 10 ;
  int octal [ ] = new int [ MAX_DIGITS ] ;
  int i = 0 ;
  while ( n != 0 ) {
    octal [ i ++ ] = n % divide ;
    n = n / divide ;
  }
  for ( int j = i - 1 , k = 0 ;
  k <= j ;
  j -- , k ++ ) if ( octal [ j ] != octal [ k ] ) return 0 ;
  return 1 ;
}

static int isPalindrome ( int n ) { int divide = ( isOctal ( n ) == 0 ) ? 8 : 10 ; int octal [ ] = new int [ MAX_DIGITS ] ; int i = 0 ; while ( n != 0 ) { octal [ i ++ ] = n % divide ; n = n / divide ; } for ( int j = i - 1 , k = 0 ; k <= j ; j -- , k ++ ) if ( octal [ j ] != octal [ k ] ) return 0 ; return 1 ; }
(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: (ternary_expression condition: (parenthesized_expression (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier))) right: (decimal_integer_literal))) consequence: (decimal_integer_literal) alternative: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (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 (expression_statement (assignment_expression left: (array_access array: (identifier) index: (update_expression (identifier))) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal))) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) update: (update_expression (identifier)) body: (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier)))) consequence: (return_statement (decimal_integer_literal)))) (return_statement (decimal_integer_literal))))