SyntaxFix
Write A Post
Hire A Developer
Questions
They serve different purposes. clear() clears an instance of the class, removeAll() removes all the given objects and returns the state of the operation.
clear()
removeAll()