Calling a function with a return type other than void as a lone statement in Java
<p>I've noticed that functions with return types like double, int, etc, can be called as statements like voids can. Like this:</p>

<pre><code>int foo() { return 5; }
....
foo();
</code></pre>

<p>What is the meaning of this? Does it literally just execute the function and then discard the return value, thus the purpose would be creating functions that can act as voids and return-type functions for multi-purpose use?</p>
