Is creating a variable to hold an object sometimes redundant?
<p>I've seen this so many times:</p>

<pre><code>public class MyApp extends SomeLibrary
{
  public static void main(String[] args)
  {
    MyApp app = new MyApp();
    app.run();
  }
}
</code></pre>

<p>Instead of:</p>

<pre><code>MyApp app = new MyApp();
app.run();
</code></pre>

<p>Why not just do:</p>

<pre><code>(new MyApp()).run();
</code></pre>

<p>when a) garbage collection exists, b) it's clear that nothing else is going to be run inside <code>public static void main</code>, and that c) <code>app</code> is clearly not going to be referenced again?</p>
