title: What is the advantage of assigning variable that is part of condition in while condition?
body: <pre><code>String var;
  while((var = "abc") == "abc"){ 
      System.out.println("In loop"); 
  }
  </code></pre>
  
  <p>What is the advantage of assigning a variable while doing a check for the condition in the while loop.</p>