How often will a function be called in a ternary operator?
<p>I have this line of Java code:</p>

<pre><code>return getValue() != null ? getValue() : 0
</code></pre>

<p>How often will <code>getValue</code> be executed? Once or twice?</p>

<p><strong>EDIT:</strong> If this is compiler-dependant, I'm especially interested in the compiler from the Sun JDK.</p>
