package test;
import mylist.*;
public class LinkedListTest1 {
public static void main(String args[])
throws CloneNotSupportedException {
LinkedList l = new LinkedList();
l.insertHead(new Integer(1));
l.insertHead(new Integer(2));
l.insertLast(new Integer(3));
l.insertLast(new Integer(4));
l.insert(new Integer(5), 3);
l.insert(new Integer(6), 3);
l.insert(new Integer(7), 3);
System.out.println("First pass");
System.out.println(l);
l.removeHead();
l.removeLast();
l.remove(2);
System.out.println("Second pass");
System.out.println(l);
LinkedList l2 = (LinkedList) l.clone();
System.out.println("Cloned list");
System.out.println(l2);
l2.removeHead();
System.out.println("Original list");
System.out.println(l);
System.out.println("Cloned list");
System.out.println(l2);
}
}