android inline class
<p>This might be a dumb question, but I've been thinking about it for some time and I have no idea what it's really called.</p>

<p>So for Android, for OnClickListeners, OnTouchListeners, etc., you're allowed to do the following:</p>

<pre><code>    bio.setOnCancelListener(new OnCancelListener() {

        public void onCancel(DialogInterface arg0) {
            // TODO Auto-generated method stub
        }
    });
</code></pre>

<p>Pretty much making a new class inline. What is this called in Java or is it an Android specific thing? Basically, what's going on when this happens? Are you pretty much creating an inner class that implements OnCancelListener since On[blah]Listeners are interfaces?</p>

<p>Thanks!</p>
