SortedSet last() method in Java
The last() method of SortedSet interface in Java is used to return the last i.e., the highest element currently in this set.Syntax: E last() Where, E is the type of element maintained by this Set.Parameters: This function does not accepts any parameter.Return Value: It returns the last or the highes