static int isPalindrome ( int i , int k ) {
  int temp = i ;
  int m = 0 ;
  while ( temp > 0 ) {
    m = temp % 10 + m * 10 ;
    temp /= 10 ;
  }
  if ( m == i ) {
    String str = integer_to_string ( m , k ) ;
    StringBuilder sb = new StringBuilder ( str ) ;
    String str1 = sb . reverse ( ) . toString ( ) ;
    if ( str . equals ( str1 ) ) {
      return i ;
    }
  }
  return 0 ;
}

static int isPalindrome ( int i , int k ) { int temp = i ; int m = 0 ; while ( temp > 0 ) { m = temp % 10 + m * 10 ; temp /= 10 ; } if ( m == i ) { String str = integer_to_string ( m , k ) ; StringBuilder sb = new StringBuilder ( str ) ; String str1 = sb . reverse ( ) . toString ( ) ; if ( str . equals ( str1 ) ) { return i ; } } return 0 ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (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: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (identifier))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) consequence: (block (return_statement (identifier)))))) (return_statement (decimal_integer_literal))))