static int rev ( int x ) {
  String s = "0" ;
  while ( x > 0 ) {
    s += x % 10 + "" ;
    x /= 10 ;
  }
  return Integer . valueOf ( s ) ;
}

static int rev ( int x ) { String s = "0" ; while ( x > 0 ) { s += x % 10 + " " ; x /= 10 ; } return Integer . valueOf ( s ) ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_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: (string_literal)))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (return_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))