What does it mean to call a Java method using "new" in a statement?
<p>Say, I have a code snippet like this:</p>

<pre><code>  public static void main(String[] args) {
        new Main().myFunction();
    }
</code></pre>

<p>Where myFunction is another method (could be non-static) defined in the same class as Main. Why would you do the above? Why not just do: <code>myFunction();</code></p>
