So the program seems simple enough but for some reason when I compile it in the windows command prompt, I get an error that reads "error, cannot find symbol and it point to the period between the list.add(); Any ideas what I'm doing wrong? Thanks!
// NOTE: THERE ARE FOUR LINES OF CODE TO ADD TO THIS CLASS
// ListTest class to demonstrate List capabilities.
public class ListTest
{
public static void main( String args[] )
{
List list = new List(); // create the List container
// insert integers in list
// add code here to insert the following values at the back of the list ( -1 0 1 5 )
list.add(-1); // add code here
list.print();
list.add(0); // add code here
list.print();
list.add(1); // add code here
list.print();
list.add(5); // add code here
list.print();
// remove objects from list; print after each removal
try
{
Object removedObject = list.removeFromFront();
System.out.printf( "%s removed\n", removedObject );
list.print();
removedObject = list.removeFromFront();
System.out.printf( "%s removed\n", removedObject );
list.print();
removedObject = list.removeFromBack();
System.out.printf( "%s removed\n", removedObject );
list.print();
removedObject = list.removeFromBack();
System.out.printf( "%s removed\n", removedObject );
list.print();
} // end try
catch ( EmptyListException emptyListException )
{
emptyListException.printStackTrace();
} // end catch
} // end main
} // end class ListTest