My question is an extension of this post.
If I have a method like this:
public static <E extends CharSequence, T extends E> List<T> doIt(List<E> nums) {
return null;
}
Why this code compiles ? Why super String is compatible with T extends CharSequence
public static void main(String[] args) {
List<CharSequence> in = new ArrayList<>();
List<? super String> result = new ArrayList<>();
result = doIt(in);
}