title: If statement greater than operation don't work
body: <p>when write the statement to tell the program to break or return, the if statement still executes every time when the condition is not satisfied and cause error :java.lang.ArrayIndexOutOfBoundsException</p>
  
  <p>I've tried greater than and equal ==, both worked. And I checked ">" is also an operator in java. Then why it still executes?</p>
  
  <pre><code>public class adjacentElementsProduct {
  
      static int adjacentElementsProduct(int[] inputArray) {
      if(inputArray ==null|| inputArray.length&lt;0) return 0;
      int res=Integer.MIN_VALUE;
  
      for( int i=0; i&lt;inputArray.length;i++){
         int stop=i+1;
  
         if((i+1) &gt; inputArray.length) break;
  
         res=Math.max(res,inputArray[i]*inputArray[i+1]);
      }
      return res;
  }
  </code></pre>
  
  <p>'''</p>
  
  <p>In this case, since '''if((i+1) > inputArray.length) break;'''
  doesn't work, so the error message is: java.lang.ArrayIndexOutOfBoundsException</p>