title: How to check multible boolean values true or false in java>
body: <p>I have 8 boolean values. I want to rollback when one or more of 8 booleans have false. </p>
  
  <pre><code>boolean flag = false;
          boolean flag1 = false;
          boolean flag2 = false;
          boolean flag3 = false;
          etc,,.
  
  flag = dbCall...
  </code></pre>
  
  <p>here the flag value changes.</p>
  
  <p>Here I have to check manually like </p>
  
  <pre><code>    if(flag == false &amp;&amp; flag1 == false &amp;&amp; ....){
        userTransaction = rollback;
      }else{
       userTransaction = commit;
      }
  </code></pre>
  
  <p>is there any simple way to check multple boolean values in java.</p>