title: Why can't I replace if statement with conditional operator (?:)?
body: <p>I've been struggling to turn</p>
  
  <pre><code>private PlaneClass preferredClass;
  
  if (preferredClass == PlaneClass.FIRST_CLASS)
      preferredClass = PlaneClass.ECONOMY_CLASS;
  else
      preferredClass = PlaneClass.FIRST_CLASS;
  </code></pre>
  
  <p>into</p>
  
  <pre><code>preferredClass == PlaneClass.FIRST_CLASS ? 
                  preferredClass = PlaneClass.ECONOMY_CLASS 
                                 : preferredClass = PlaneClass.FIRST_CLASS;
  </code></pre>
  
  <p>The if-statement <strong>compiles</strong>.
  The conditional operator <strong>doesn't</strong>. (Error messages: 1. Type mismatch: cannot convert from PlaneClass to boolean 2. syntax error on token "=". And two other error...). Where did I go wrong?</p>