Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The type List is not generic; it cannot be parameterized with arguments <String>
at testeIO.Teste.main(Teste.java:10)
package testeIO;
import java.awt.List;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
public class Teste {
public static void main(String[] args) throws IOException {
List<String> lista = new ArrayList<String>();
lista.add("Sérgio");
lista.add("Paulo");
lista.add("Guilherme");
System.out.println(lista);
Collections.sort(lista);
System.out.println(lista);
}
}