title: Detect If Two Integers Have Opposite Signs
signature: class Solution {
  
      public Boolean detectIfTwoIntegersHaveOppositeSigns(Integer x, Integer y) {
source_py: def detect_if_two_integers_have_opposite_signs(x, y):
      return ((x ^ y) < 0)
source_cpp: bool detect_if_two_integers_have_opposite_signs(int x, int y) {
    return ( ( x ^ y ) < 0 );
  }
question_info.extension: java
question_info.entry_fn_name: detectIfTwoIntegersHaveOppositeSigns
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": true, "inputs": {"x": 59, "y": -99}}, {"idx": 1, "outputs": false, "inputs": {"x": -20, "y": -21}}, {"idx": 2, "outputs": true, "inputs": {"x": -100, "y": 79}}, {"idx": 3, "outputs": true, "inputs": {"x": 54, "y": -49}}, {"idx": 4, "outputs": true, "inputs": {"x": -16, "y": 16}}, {"idx": 5, "outputs": false, "inputs": {"x": -23, "y": -68}}, {"idx": 6, "outputs": false, "inputs": {"x": 93, "y": 37}}, {"idx": 7, "outputs": true, "inputs": {"x": 24, "y": -61}}, {"idx": 8, "outputs": true, "inputs": {"x": -8, "y": 69}}, {"idx": 9, "outputs": false, "inputs": {"x": 29, "y": 10}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer x, Integer y, Boolean expected){
          try{
              Driver driver = new Driver();
              if (driver.run(x, y,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(59, -99, true);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(-20, -21, false);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(-100, 79, true);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(54, -49, true);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(-16, 16, true);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(-23, -68, false);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(93, 37, false);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(24, -61, true);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(-8, 69, true);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(29, 10, false);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer x, Integer y, Boolean expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(x, y),expected);
      }
      
      public boolean validateSolution(Boolean actual, Boolean expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__