I am confused about the following code, please help
This does not compile. As we cannot cast <? extends CharSequence> to <
String> (Given String implements CharSequence)
Code fixes with following change:
Please elaborate on this. I though "? extends CharSequence" should work for String, Is there any issue related to ambiguity of return type??..
Source : K&B self
test questions.