What is the function of the isEmpty(), size() and clear() methods from the Collection interface?

What is the function of the isEmpty(), size() and clear() methods from the Collection interface?



Answer: isEmpty returns true if there are no elements in the collection. size() returns the count of elements in the collection. clear() wipes all elements from the collection.


Learn More :

Data Structures

Learn More Multiple Choice Question :