title: Calling a method in the while loop condition
body: <p>I'm curious is it possible to call a method that returns a boolean value in the condition part of a while loop?</p>
  
  <p>As in:</p>
  
  <pre><code>    while(someMethod()!= true){
            //Do stuff
      }
  </code></pre>
  
  <p>And the method simply returns a true or false. Is this possible or not and if so is there a correct syntax or a better way?</p>
  
  <p>Edit: Thanks for the quick responses. As an extension to my question is it possible to call the method multiple times for different things but require them all to be the same before exiting the loop?</p>
  
  <p>For example:</p>
  
  <pre><code>while(!(someMethod(input_a) == someMethod(input_b))){
      //Do stuff
  }
  </code></pre>
  
  <p>Where both of the returned values are the returned values are equal?</p>