static void findRoots ( int b , int c ) {
  int a = 1 ;
  int d = b * b - 4 * a * c ;
  double sqrt_val = Math . sqrt ( Math . abs ( d ) ) ;
  if ( d > 0 ) {
    double x = - b + sqrt_val ;
    double y = - b - sqrt_val ;
    int root1 = ( int ) ( x ) / ( 2 * a ) ;
    int root2 = ( int ) ( y ) / ( 2 * a ) ;
    if ( root1 + root2 == - 1 * b && root1 * root2 == c ) System . out . print ( root1 + ", " + root2 ) ;
    else System . out . print ( - 1 ) ;
  }
  else if ( d == 0 ) {
    int root = - b / ( 2 * a ) ;
    if ( root + root == - 1 * b && root * root == c ) System . out . print ( root + ", " + root ) ;
    else System . out . print ( - 1 ) ;
  }
  else {
    System . out . print ( - 1 ) ;
  }
  System . out . println ( ) ;
}

static void findRoots ( int b , int c ) { int a = 1 ; int d = b * b - 4 * a * c ; double sqrt_val = Math . sqrt ( Math . abs ( d ) ) ; if ( d > 0 ) { double x = - b + sqrt_val ; double y = - b - sqrt_val ; int root1 = ( int ) ( x ) / ( 2 * a ) ; int root2 = ( int ) ( y ) / ( 2 * a ) ; if ( root1 + root2 == - 1 * b && root1 * root2 == c ) System . out . print ( root1 + " , ▁ " + root2 ) ; else System . out . print ( - 1 ) ; } else if ( d == 0 ) { int root = - b / ( 2 * a ) ; if ( root + root == - 1 * b && root * root == c ) System . out . print ( root + " , ▁ " + root ) ; else System . out . print ( - 1 ) ; } else { System . out . print ( - 1 ) ; } System . out . println ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (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: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (identifier))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (unary_expression operand: (identifier)) right: (identifier)))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (unary_expression operand: (identifier)) right: (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (cast_expression type: (integral_type) value: (parenthesized_expression (identifier))) right: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (cast_expression type: (integral_type) value: (parenthesized_expression (identifier))) right: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (unary_expression operand: (decimal_integer_literal)) right: (identifier))) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)))) consequence: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (string_literal)) right: (identifier))))) alternative: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (unary_expression operand: (decimal_integer_literal))))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (unary_expression operand: (identifier)) right: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (unary_expression operand: (decimal_integer_literal)) right: (identifier))) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)))) consequence: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (string_literal)) right: (identifier))))) alternative: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (unary_expression operand: (decimal_integer_literal))))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (unary_expression operand: (decimal_integer_literal)))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list)))))