package Collection_1;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
public class ArrayListMethods {
public static void main(String[] args)
{
List<Integer> intList = new ArrayList<Integer>();
intList.add(9);
intList.add(0);
Collections.sort(intList);
}
}
This code is giving the error The import java.util.Collections cannot be resolved while importing import java.util.Collections. I'm using sort method from Collections class. I'm using eclipse IDE for writing the code. If anyone has any idea please try to answer.