Throwing an UnsupportedOperationException
问题 So one of the method descriptions goes as follows: public BasicLinkedList addToFront(T data) This operation is invalid for a sorted list. An UnsupportedOperationException will be generated using the message "Invalid operation for sorted list." My code goes something like this: public BasicLinkedList<T> addToFront(T data) { try { throw new UnsupportedOperationException("Invalid operation for sorted list."); } catch (java.lang.UnsupportedOperationException e) { System.out.println("Invalid