This override does not compile, but when the type parameter T is removed from the overriding method it compiles fine. Why?
class Base {
public <T> Collection<String> transform(Collection<String> list) {
return null;
}
}
class Derived extends Base {
@Override
public <T> Collection<String> transform(Collection list) {
return null;
}
}
You forgot Collection in the method parameter.
Version that may be compiled: