title: how to check if an array of booleans contains all true values?
body: <p>I have the following boolean array:</p>
  
  <pre><code>boolean booleanArray[]  = new boolean [size];
  </code></pre>
  
  <p>How can I check if all values inside the array are true, and use this information for another boolean " allTrue "?</p>
  
  <p>I need to use this for a while loop, i.e.:</p>
  
  <pre><code>while(alltrue){
              keepgoing();
          }
  </code></pre>
  
  <p>I thought of doing a for loop checking each value but that just returns the value of one, and I don't know how to compare with the rest to know if they are all equal.<br>
  Thanks in advance.</p>