title: Multiple conditional if() statements in Java?
body: <p>I know this is going to seem like an unforgiveable sin, but I have <strong>150 variables</strong>, and I want to create an <strong>if function</strong> that does the following:</p>
  
  <pre><code>if(a != 0 &amp;&amp; b != 0 &amp;&amp; c != 0....) {
    //do this
  } else {
    //do this instead
  }
  </code></pre>
  
  <p><strong>However</strong>, when I set one of the if statement conditions (i.e <code>b!=1</code>), whilst the others are still the same (<code>a!=0</code>, <code>c!=0</code>), the else function is still run, even though it should be the initial <code>//do this</code> instead of the <code>//do this instead</code> (see code snippet above).</p>
  
  <p>My question is: </p>
  
  <p><strong>1.</strong> Is there a reason why it is not working, and if there is, how do i fix it?<br>
  <strong>2.</strong> Is there a simpler way to do that without having to list all 150 variables <code>!=0 &amp;&amp; !=0</code> <em>etc</em>..?</p>
  
  <p>Cheers</p>