title: Can't seem to get the right value in a for loop with and if-else statement
body: <p>This is my code: </p>
  
  <pre><code>    int numArray [] = {1, 7, 6, 4, 5, 9};
  
      int high = 0,low = 0;
  
      for (int count = 0; count &lt; 2; count++) {
          if (count == 0) {
              for (int countA = 0; countA &lt; numArray.length-1; countA++) { //The increment expression is invoked after each iteration/time through the loop.
                  high = numArray[countA];
                  if (high &lt; numArray[countA+1]) {
                      high = numArray[countA+1];
                  }
              }
          }
          else {
              for (int countB = 0; countB &lt; numArray.length-1; countB++) {
                  low = numArray[countB];
                  if (low &gt; numArray[countB+1]) {
                      low = numArray[countB+1];
                  }
              }   
          }
      }
  </code></pre>
  
  <p>When I print the value for low from else block, it prints 5 instead of the expected value of 1. Why is this?</p>