I'm learning about Array and I'm breaking my head with this code, can anyone explain why it's not working?
This error appears
The type List is not generic; it can not be parameterized with arguments
in this line List<Integer> lista = new ArrayList<Integer>();
package DeclaracaoArray;
import java.awt.List;
import java.util.ArrayList;
import java.util.Collections;
public class Declaracao_Array {
public int sorteia(){
List<Integer> lista = new ArrayList<Integer>() ;
lista.add ( "Alice" ) ;
lista.add ( "Bruno" ) ;
lista.add ( "Carlos" ) ;
lista.add ( "Daniel" ) ;
Collections.shuffle ( lista ) ;
// pega qualquer indice. pegamos o primeiro para conveniencia.
return (( Integer ) lista.get ( 0 )).intValue () ;
}
}