Hey guys. I am trying to sort a list that has been populated using a random number generator. I am trying to use collections to sort the list but I am not have any luck. I have been stuck on this for a while and would greatly appreciate any help or pointers you could give me. I only attached my main class because I think you can tell what is going on from that. Everything works except line 22. This is the error I am getting:
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code
at List.ListTest.main(ListTest.java:22)
Java Result: 1
Thanks in advance for any help!
import java.util.*;
public class ListTest
{
public static void main( String args[] )
{
List list = new List(); // create the List container
Random generator = new Random();
int value;
for ( int i =1; i <= 25; i++)
{
value = generator.nextInt(100);
list.insertAtFront( value );
list.print();
}
Collections.sort(list);
} // end main
} // end class ListTest