static String reverseWord ( String str ) {
  int len = str . length ( ) ;
  int i = 1 ;
  int j = str . length ( ) - 2 ;
  char [ ] strchar = str . toCharArray ( ) ;
  while ( i < j ) {
    char temp = strchar [ i ] ;
    strchar [ i ] = strchar [ j ] ;
    strchar [ j ] = temp ;
    i ++ ;
    j -- ;
  }
  str = new String ( strchar ) ;
  return str ;
}

static String reverseWord ( String str ) { int len = str . length ( ) ; int i = 1 ; int j = str . length ( ) - 2 ; char [ ] strchar = str . toCharArray ( ) ; while ( i < j ) { char temp = strchar [ i ] ; strchar [ i ] = strchar [ j ] ; strchar [ j ] = temp ; i ++ ; j -- ; } str = new String ( strchar ) ; return str ; }
(method_declaration (modifiers) type: (type_identifier) 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)))) (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: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)))) (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)))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (array_access array: (identifier) index: (identifier)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))) (expression_statement (update_expression (identifier))) (expression_statement (update_expression (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (object_creation_expression type: (type_identifier) arguments: (argument_list (identifier))))) (return_statement (identifier))))