Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumJavagenerics bounds wildcards PECSSingle-choice MCQ

Given the helper below, which statement about the commented-out line is correct?

static <T> void copy(List<? extends T> src, List<? super T> dest) { for (T item : src) { dest.add(item); // OK // src.add(item); // ? } }