Assign variable in Java while-loop conditional?
<p>I have a method that does a lot of checking and computation and returns a custom class, returnMessage. returnMessage has 2 booleans and a String. What I want to do is run this method in a while loop from my main class and have access to the returnMessage object after the while loop terminates for the last time. </p>

<p>In php this would be a case of </p>

<pre><code>while ( $returned = myObject-&gt;myMethod()-&gt;finished )
{

}

if( $returned -&gt; finished == FALSE)
{
...
}
</code></pre>

<p>However trying to assign like this gives me a boolean expected error in java (there might be php errors in the above, it's late :D )  </p>
