Vcoder
Vcoder

Reputation: 124

Collections sort - Cannot find symbol

i have this code working perfectly fine on netbeans 8, but i can't seem to compile it with javac. It gives 2 errors:

enter image description here

I have the following imports:

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

EDIT: Forgot to add -> Ponto and Percursos are inner classes. ListaPercursos and ListaPontos are ArrayList of those classes.

Upvotes: 0

Views: 1897

Answers (1)

Sotirios Delimanolis
Sotirios Delimanolis

Reputation: 279970

List#sort(Comparator) was added in Java 8. It seems you have a Java 7 compiler. You'll need to upgrade.

Upvotes: 4

Related Questions