L'errore:Perché non è possibile aggiungere Stringa per digitare nell'elenco <?>?
The method add(capture#1-of ?) in the type List<capture#1-of ?> is not
applicable for the arguments (String)
Codice:
List<?> to = new ArrayList<Object>();
to.add(new String("here"));
Dal List<?>
è un tipo elenco generico e quindi può essere di qualsiasi tipo, allora perché non accetta String nel metodo add?
Sì, e quel commento non ha alcun rapporto alla domanda;) –