title: Implement generic method with List parameter
body: <p>I'm trying to define and then implement an abstract setter which takes a List of Objects as a parameter.  Here's the gist of this simple idea:</p>
  
  <pre><code>public abstract class MyClass {
      public abstract void setThings(List&lt;?&gt; things);
  }
  
  public class Bar extends MyClass {
      private List&lt;String&gt; things;
  
      @Override
      public void setThings(List&lt;String&gt; things) {
          this.things = things;
      }
  }
  </code></pre>
  
  <p>That doesn't work.  I get <code>Method does not override method from its superclass</code> and <code>both methods have the same erasure, but neither overrides the other</code>.  I understand the latter error relating to erasures, but even so I can't figure out the correct way to do this.  I've tried some others like:</p>
  
  <pre><code>public abstract &lt;T&gt; void setThings(List&lt;T&gt; things);
  </code></pre>
  
  <p>...as well as a few others. And I've found other questions/answers on SO that come close to addressing this, but none that have provided a solid answer (at least not that was clear to me). I've read through <a href="https://docs.oracle.com/javase/tutorial/java/generics/types.html" rel="nofollow">the tutorials</a> as well to no avail.  What am I missing?</p>