title: Anonymous Inner Class request for clarification
body: <p>While learning TTS on Android, I came across the following code snippet:</p>
  
  <pre><code>    speakBtn.setOnClickListener(new OnClickListener() {
          @Override
          public void onClick(View view) {
              mTts.speak(words.getText().toString(), TextToSpeech.QUEUE_ADD, null);
          }});
  </code></pre>
  
  <p>I am really new to Java, so my level of confidence in identifying the various constructs isn't that great. I think that I see above is an <a href="http://viralpatel.net/blogs/2009/10/inner-classes-in-java.html" rel="nofollow noreferrer">Anonymous Inner Class</a> but the '<strong>new OnClickListener()</strong>' is confusing to me. So please confirm and/or correct any of the following understanding:</p>
  
  <ol>
  <li>The inner class is defined right
  after new OnClickListener().</li>
  <li>OnClickListener is a super class
  from which the inner class is
  derived.</li>
  <li>The (anonymous) inner class has only
  one member function: OnClick().</li>
  <li>What is @Override inside the
  definition of the inner class? If
  this is an annotation, then I am
  confused as <a href="https://stackoverflow.com/questions/3021548/annotate-anonymous-inner-class">this answer</a> states
  that anonymous inner classes cannot
  be annotated.</li>
  </ol>
  
  <p>Lastly, is there a way to write the above snippet in a way that is easier to decipher for a n00b like me?</p>