import structure5.*; class Example { public static void main(String[] args) { SinglyLinkedList list = new SinglyLinkedList<>(); list.add("hello"); list.add("world"); //System.out.println(list); myPrint(list); Vector v = new Vector<>(); v.add("hello"); v.add("world"); //System.out.println(v); myPrint(v); } /** * A custom print function. Note that it works for any * list, containing any element type T. It doesn't even * care whether that list is a Vector or a SinglyLinkedList, * as long as whatever you give it satisfies the List * interface (contract). */ public static void myPrint(List xs) { System.out.println("whee" + xs); } }