title: Java ternary operator with empty clause
body: <p>This question is more for my curiosity than anything else.</p>
  
  <p>I often employ Java's ternary operator to write shorter code. I have been wondering, however, whether it is possible to use it if one of the <code>if</code> or <code>else</code> conditions are empty. In more details:</p>
  
  <pre><code>int x = some_function();
  if (x &gt; 0)
      x--;
  else
      x++;
  </code></pre>
  
  <p>can be written as <code>x = (x &gt; 0) ? x-1 : x+1;</code></p>
  
  <p>But is it possible to write <code>if (x &gt; 0) x-1;</code> as a ternary expression with an empty <em>else</em> clause?</p>