7
¿Cómo puedo agregar a la lista <? extiende Número> estructuras de datos?
Tengo una lista que se declara así: List<? extends Number> foo3 = new ArrayList<Integer>(); Traté de agregar 3 a foo3. Sin embargo, recibo un mensaje de error como este: The method add(capture#1-of ? extends Number) in the type List<capture#1-of ? extends Number> is not applicable for the arguments (ExtendsNumber)