title: What does an assignment expression evaluate to in Java?
body: <p>I encountered a statement in Java</p>
  
  <pre><code>while ((line = reader.readLine()) != null) {
      out.append(line);
  }
  </code></pre>
  
  <p>How do assignment operations return a value in Java?</p>
  
  <p>The statement we are checking is <code>line = reader.readLine()</code> and we compare it with <code>null</code>.</p>
  
  <p>Since <code>readLine</code> will return a string, how exactly are we checking for <code>null</code>?</p>