public static int binarySearch ( int [ ] arr , int num ) {
  int result = Arrays . binarySearch ( arr , num ) ;
  return ( result >= 0 ) ? result : ~ result ;
}

public static int binarySearch ( int [ ] arr , int num ) { int result = Arrays . binarySearch ( arr , num ) ; return ( result >= 0 ) ? result : ~ result ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (integral_type) 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 (identifier) (identifier))))) (return_statement (ternary_expression condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (identifier) alternative: (unary_expression operand: (identifier))))))