title: Why does the inner class complain about generic type?
body: <p>I have a class that implements Iterable so that the user can use an iterator. I'm using generics to allow the user to use any type and work with the class.</p>
  
  <p>This is the working code below without warnings-</p>
  
  <pre><code>public class CustomStackUsingArray&lt;Type&gt; implements CustomList&lt;Type&gt;, Iterable&lt;Type&gt; {
  
      Type []arr;
  
      public Iterator&lt;Type&gt; iterator() {
          return (new ListIterator());
      }
  
      private class ListIterator implements Iterator&lt;Type&gt;{
          //Implement Iterator here
      }
  
      //Implement other methods here
  }
  </code></pre>
  
  <p>However, if I have the ListIterator defined like this-</p>
  
  <pre><code>private class ListIterator&lt;Type&gt; implements Iterator&lt;Type&gt;
  </code></pre>
  
  <p>I get a warning in Eclipse, <code>The parameter Type is hiding the type Type</code></p>
  
  <p>Why does it complain when I specify the generic type after my class? Shouldn't I have to do that in order for me to be able to use Type inside my class? I added <code>Type</code> when defining <code>CustomStackUsingArray</code> and that works fine.</p>