import structure5.*; class Example2 { 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); } /** * Here I modify my list implemenation to add an * element to the list before printing. Since this * implementation adds a String element ("whee") to * the list, the Example.myPrint implementation in * the other file no longer works. That implementation * expects that the list element could be anything (T). But * below, it can't be anything: I am adding a String. * So this implementation is different so that it is * not generic. * * Can you think of a way of adding an element generically? * Hint: change the myPrint signature to take another * argument. */ public static void myPrint(List xs) { xs.add("whee"); System.out.println(xs); } }