title: Generics with Wildcards (Map<? extends A, List<? extends B>>)
body: <p>Consider the following code:</p>
  
  <pre><code>public interface A {};
  
  public class AImpl implements A {};
  
  public interface B {};
  
  public class BImpl implements B {};
  
  public interface Service{
    Map&lt;? extends A, List&lt;? extends B&gt;&gt; get();
  }
  </code></pre>
  
  <p>Why does the following implementation of Service not compile?</p>
  
  <pre><code>public class ServiceImpl implements Service {
    public Map&lt;AImpl, List&lt;BImpl&gt;&gt; get() {
      return null;
    }
  }
  </code></pre>
  
  <p>Compiler error: </p>
  
  <blockquote>
    <p>The return type is incompatible with <code>Service.get()</code></p>
  </blockquote>
  
  <p>But the following code compile:</p>
  
  <pre><code>public interface Service{
     List&lt;? extents B&gt; get();
  }
  
  public class ServiceImpl implements Service{
     public List&lt;BImpl&gt; get(){
         return null;
     }
  }
  </code></pre>