Forum Stats

  • 3,827,153 Users
  • 2,260,746 Discussions


How To Override Supertype Generic Method with List Parameter

1027945 Member Posts: 1
edited Feb 2, 2016 7:54PM in Generics

Does anyone know if the following is possible and if so, how to do it?

public interface Factory {

       public <T extends Object> Response create(T value);


public class ListFactory implements Factory {

       public <T extends List<?>> Response create(List<?> value) {...}


The compile complains that the method create(List<?>) of type ListFactory must override or implement a supertype method

This discussion has been closed.