public class Test {

    public static void main (String[] args) {

	// note: the following is a really bad way to build a list.
	// warning signs of badness: allocating two different kinds
	// of objects, accessing the instance variables of another class,
	// using the constant 3 to set the length

	// create an empty list
	LinkedList list = new LinkedList ();

	list.addFirst (3);
	list.addFirst (2);
	list.addFirst (1);

	list.print ();

	LinkedList copy = (LinkedList) list.clone ();
	copy.print ();

	copy.reverse ();
	copy.print();

	list.addLast (6);
	list.print();

	list.add (3, 4);
	list.print();

	list.set (4, 5);
	list.print();

	list.append (copy);
	list.print();
    }
}
