title: Regarding the if...else condition which is not working
body: <p>The code that is shown below is working fine but only for one part, the if...else statement which must return -1 if the inputted month is less than 1 or more than 12 and the inputted year less than 1 or more than 9999</p>
  
  <p>I have compile it many times, I have even tried rearranging the conditions like changing the less than to more than then putting the entire switch statement into the if statement. nothing seems to be working</p>
  
  <pre><code>public static int getDaysInMonth(int month, int year) {
  
          int maxDay = 31;
          int secMaxDay = 30;
          int specialDay = 29;
          int minDay = 28;
  
      if ((month &lt; 1 || month &gt; 12) &amp;&amp; (year &lt; 1 || year &gt; 9999)) {
          return -1;
  
      } else {
          switch (month) {
              case 1:
              case 3:
              case 5:
              case 7:
              case 8:
              case 10:
              case 12:
                  return maxDay;
  
              case 2:
                  if (isLeapYear(year)){
                      return specialDay;
                  } else {
                      return minDay;
                  }
  
              default:
                  return secMaxDay;
          }
      }
  }
  </code></pre>
  
  <p>The expected output for my above code is, when either the month or year or both have a value of less than 1 or more than the max value, it should return -1.</p>