title: Comparing elements of two arrays
body: <p>My method accepts two arrays of integers and returns <code>true</code> if </p>
  
  <ol>
  <li>The arrays are the same length and </li>
  <li>each a.element is less than the b.element of the same index.</li>
  </ol>
  
  <p>It works for all my test cases except when <code>int[] a = {1, 2, 3}</code> and <code>int[] b = {4, 5, 1}</code>. It returns true even though <code>a[2] &gt; b[2]</code>. The <code>digitDifference</code> check isn't working correctly but I can't see the error.</p>
  
  <pre><code>public static boolean allLess(int[] a, int[] b) {
      int i = 0;
      boolean sameLength = (a.length == b.length);
      boolean digitDifference = (a[i] &lt; b[i]);
      for (i = 0; i &lt;= a.length - 1; i++) {}
      return (sameLength &amp;&amp; digitDifference);
  }
  </code></pre>