AbstractSet isEmpty() method in Java with Example
The isEmpty() method of AbstractSet in Java is used to check whether this AbstractSet is empty or not. It returns an boolean value stating the same.
public boolean isEmpty()
Parameters: This function has no parameters.
Returns: The method returns an boolean value which states that this instance of the AbstractSet is empty or not.
Below examples illustrates the AbstractSet.isEmpty() method:
AbstractSet: [1, 2, 3, 4] Is AbstractSet empty? false
AbstractSet:  Is AbstractSet empty? true
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.