what are the pros and cons of declare and use method local class in java?
<p>i have seen many developers using <code>method local class</code> (i don't mean anonymous class) in their code.</p>

<p>for example (in android):</p>

<pre><code>private void myFunc()
{
    class Worker extends AsyncTask&lt;Void, Void, Void&gt; 
    {...}

    new Worker();
}
</code></pre>

<p>what are the pros and cons when doing this for both design and run time? 
is it bad to use local class when the method is called many times?</p>
