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

Given the PECS rule, which signature lets the method both read values out as Number AND is the correct producer form?

// We want to sum the elements, reading each as a Number. double sum(List<???> nums) { double t = 0; for (Number n : nums) t += n.doubleValue(); return t; }