title: Why does my program not accept my boolean result that i am returning?
body: <p>All i want is to return true if x and y are both "true".</p>
  
  <p>I want to use the switch/case method, instead of a simple if/else.</p>
  
  <p>But i can't get the method to accept my return result. </p>
  
  <p>Do you guys have an idea?</p>
  
  <pre><code> public class test2 {
       public static boolean f(boolean x, boolean y){
          switch(x + "-" + y){            
          case "true-false": 
               return false; //i also tried "return x" or "return y"
          case "false-true": 
               return false;
          case "true-true": 
               return true;
          case "false-false": 
               return false; 
          }
      }
  
  
      public static void main(String[]args){
          f(false,true);
      }   
  }
  </code></pre>