Cannot convert from List<List> to List<List<?>>
问题 A raw list converts to List<?> just fine. Why can't a list of raw lists convert to a list of List<?> ? { // works List raw = null; List<?> wild = raw; } { // Type mismatch: cannot convert from List<List> to List<List<?>> List<List> raw = null; List<List<?>> wild = raw; } Backstory (to mitigate the xy problem): An API I'm using returns List<JAXBElement> . I happen to know that it is always List<JAXBElement<String>> . I plan to loop and build my own List<String> , but I was trying to fix (but