title: for loop with multiple conditions
body: <p>I have an array</p>
  
  <pre><code>int[] arr = {9,20,-2,-45,23,5,1};
  </code></pre>
  
  <p>I'm sorting it using </p>
  
  <pre><code>java.util.Arrays.sort(arr);
  </code></pre>
  
  <p>The for loop: </p>
  
  <pre><code>for(int i =0;(i&lt;arr.length) &amp;&amp; (arr[i] &gt; 0) ; i++)
  </code></pre>
  
  <p>doesn't seem to work because of the condition <code>(arr[i] &gt; 0)</code>. I coudn't think of a reason why this shouldn't work. What's surprising is that the follwing loop works in expected manner :</p>
  
  <pre><code>for(int i =0;(i&lt;arr.length) &amp;&amp; (arr[i] != 0) ; i++)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>for(int i =0;(i&lt;arr.length) &amp;&amp; (arr[i] &lt; 0) ; i++)
  </code></pre>