The java.util.NavigableSet.isEmpty() method is used to check if a NavigableSet is empty or not. It returns True if the NavigableSet is empty otherwise it returns False.
Syntax:
boolean isEmpty()
Parameters: This method does not take any parameter
Return Value: The method returns True if the NavigableSet is empty else returns False.
Below program illustrate the java.util.NavigableSet.isEmpty() method:
Output:
NavigableSet: [4, Geeks, To, Welcome]
Is the NavigableSet empty? false
Is the NavigableSet empty? true