title: Can Java's ternary/conditional operator (?:) be used to call methods instead of assigning values?
body: <p>In pages like <a href="http://en.wikipedia.org/wiki/%3F:" rel="noreferrer">http://en.wikipedia.org/wiki/?:</a> the ternary/conditional operator <code>?:</code> seems to be used for conditional assignments. I tried to use it for method calling, like this:</p>
  
  <pre><code>(condition) ? doThis() : doThat();
  </code></pre>
  
  <p>Both methods return void. Java tells me it is not a statement.</p>
  
  <p>So, I'm guessing I can't do conditional method calling... or can I?</p>