static boolean checkPalindrome ( String str ) {
  int len = str . length ( ) ;
  len -- ;
  for ( int i = 0 ;
  i < len ;
  i ++ ) {
    if ( str . charAt ( i ) != str . charAt ( len ) ) return false ;
    len -- ;
  }
  return true ;
}

static boolean checkPalindrome ( String str ) { int len = str . length ( ) ; len -- ; for ( int i = 0 ; i < len ; i ++ ) { if ( str . charAt ( i ) != str . charAt ( len ) ) return false ; len -- ; } return true ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (update_expression (identifier))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) consequence: (return_statement (false))) (expression_statement (update_expression (identifier))))) (return_statement (true))))