This is my code:
private <T,L extends ArrayList<? extends T>> L Foo(L<T> list1) {
L list2 = new ArrayList<T>();
//more code
}
I'm using IDEA and get the following error message for the method parameter:
Type 'L' does not have type parameters
and the following error message for creating the ArrayList:
Incompatible types. <br>Required: L <br> Found: java.utils.ArrayList<T>;
Why does this happen? L
extends ArrayList so it should have the same type parameters right?