Giving multiple conditions in for loop in Java
<p>I was searching for "How to give multiple conditions in a for loop?" But there are no direct answers given. </p>

<p>After some research I found the correct way. Conditions should not be comma(,) or semicolon(;) separated. We can use the &amp;&amp; operator to join both the conditions together.</p>

<p>for( initialization ; condition1 &amp;&amp; condition2 ; increment)</p>

<p>Example: </p>

<pre><code>for(int j= 0; j &lt; 6 &amp;&amp; j &lt; ((int)abc[j] &amp; 0xff) ; j++ ) 
{
//
}
</code></pre>

<p>Hope this helps the new Java developers.</p>
