Standard LibraryTypesSetMethodsmaxOn this pagemax Method of Set. max() -> const Object Returns the maximum element in the container. Throws an exception if the container is empty.