Galera, espero que alguem possa me ajudar, me deparei com a seguinte questão e não entendi esse maldito retorno na assinatura do metodo
// Given a method declared as:
public static <E extends Number> List<? super E> process(List<E> nums)
//A programmer wants to use this method like this:
// INSERT DECLARATIONS HERE
output = process(input);
//Which pairs of declarations could be placed at // INSERT DECLARATIONS HERE to allow
//the code to compile? (Choose all that apply.)
A. ArrayList<Integer> input = null;
ArrayList<Integer> output = null;
B. ArrayList<Integer> input = null;
List<Integer> output = null;
C. ArrayList<Integer> input = null;
List<Number> output = null;
D. List<Number> input = null;
ArrayList<Integer> output = null;
E. List<Number> input = null;
List<Number> output = null;
F. List<Integer> input = null;
List<Integer> output = null;
G. None of the above.
// B, E, and F are correct.
// The return type of process is definitely declared as a List, not an ArrayList, so A and D
// are wrong. C is wrong because the return type evaluates to List<Integer>, and that can't
// be assigned to a variable of type List<Number>. Of course all these would probably cause a
// NullPointerException since
Por que a Alternativa C não compila. Se alguem puder me ajudar agradeço.
“C is wrong because the return type evaluates to List”, A assinatura do metodo volta um “List<? super E>” ao invez de apenas “List”. Poderia ser um erro do livro?

mia tia sempre dizia; errar é humano perseverar é :evil: diabolico eheheheh