/*** * * @author gtowell * file: Main.java * Desc: * The main driver for a small linked list example. This creates the linked list * adds some rabbits, print, remove and reprint. */ public class Main { public static void main(String[] args) { LinkedList ll = new LinkedList(); Rabbit rr = new Rabbit("Angora", 1.1, "1a"); ll.addFirst(rr); ll.addFirst(new Rabbit("Lop", 1.2, "2a")); ll.addFirst(new Rabbit("Dutch", 1.3, "22v")); ll.addLast(new Rabbit("Angora", 1.4, "17c")); ll.addLast(new Rabbit("Lop", 1.4, "19c")); System.out.println(ll + "\n"); //ll.removeFirst(); //ll.removeLast(); ll.remove(rr); System.out.println(ll); } }