title: Why do we give class literals of annotation to the getAnnotation method?
body: <p>Why we give class literals of annotation to the getAnnotation method?
  For example I want to get the class annotation and put Annotation preceding the Class.</p>
  
  <pre><code>@interface MyAnno {
   String str();
   int val();
  }
  class JavaApplication22 {
  </code></pre>
  
  <p>Why I can't get the annotation of the Class with second method?How class literals work in this situation?</p>
  
  <pre><code>MyAnno anno = m.getAnnotation(MyAnno.class); //First Method
  MyAnno anno = m.getAnnotation(MyAnno);       //Second Method
  </code></pre>