private static boolean isBouncy ( int x ) {
  if ( x < 100 ) return false ;
  else {
    boolean nonincreasing = true ;
    boolean nondecreasing = true ;
    int lastDigit = x % 10 ;
    x /= 10 ;
    while ( x != 0 ) {
      int digit = x % 10 ;
      if ( digit > lastDigit ) nondecreasing = false ;
      else if ( digit < lastDigit ) nonincreasing = false ;
      lastDigit = digit ;
      x /= 10 ;
    }
    return ! nonincreasing && ! nondecreasing ;
  }
}

private static boolean isBouncy ( int x ) { if ( x < 100 ) return false ; else { boolean nonincreasing = true ; boolean nondecreasing = true ; int lastDigit = x % 10 ; x /= 10 ; while ( x != 0 ) { int digit = x % 10 ; if ( digit > lastDigit ) nondecreasing = false ; else if ( digit < lastDigit ) nonincreasing = false ; lastDigit = digit ; x /= 10 ; } return ! nonincreasing && ! nondecreasing ; } }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (return_statement (false)) alternative: (block (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (true))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (true))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (expression_statement (assignment_expression left: (identifier) right: (false))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (expression_statement (assignment_expression left: (identifier) right: (false))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (return_statement (binary_expression left: (unary_expression operand: (identifier)) right: (unary_expression operand: (identifier))))))))