The forall() method is utilized to check if the given predicate satisfies all the elements of the set or not.
Method Definition: def forall(p: (A) => Boolean): Boolean
Return Type: It returns true if the stated predicate holds true for all the elements of the set else it returns false.