Java: Retrieve and remove the last element of a tree set

Java: Retrieve and remove the last element of a tree set