title: Single expression in ternary operator in Java
body: <p>I know you can have </p>
  
  <pre><code>String answer = (5 == 5) ? "yes" : "no";
  </code></pre>
  
  <p>Is it somehow possible to have only:</p>
  
  <pre><code>String answer = (5 == 5) ? "yes";
  </code></pre>
  
  <p>It gives a compile error when I try.</p>
  
  <p>NOTE: <code>(5==5)</code> is just an example. In its place will be statement which could be either true or false.</p>