title: Returning a Generic Empty List
body: <p>How do I return a custom object which uses generic as an empty list?</p>
  
  <p>I have extended the List interface and created my own custom type</p>
  
  <pre><code>public interface MyCustomList&lt;T&gt;
    extends List&lt;T&gt;
  {
  </code></pre>
  
  <p>In a class, I have a method which returns a custom list but I always end up with a compiler error.  Basically the default implementation of this method should return an empty list but I cant get it to work since I am encountering below error.
  'incompatible types'</p>
  
  <pre><code>public MyCustomList&lt;MyCustomBean&gt; getCodes(String code)
  {
      return  Collections.&lt;MyCustomList&lt;MyCustomBean&gt;&gt;emptyList();
  }
  </code></pre>
  
  <p>Whats the proper way of sending back a 'generified' empty list implementation?</p>