java2db

containsAll method in Collections framework



containsAll method  checks  for a collection of elements in a specific collection .

containsAll method Add elements ( need to be search ) to a Collection , pass it to containsAll method as an argument .

containsAll method Returns true , if all or any search element exists  in the specific collection.

containsAll method This method exists in Collection , Set and List interfaces .

Syntax:

 <specifiedCollectionObject>.containsAll(<specifiedCollectionElementsObject>);

Example for containsAll method:

Execution Result:

containsAll method Use it to search for more element .
containsAll method If the specified collection contains null element, containsAll  returns false.




Related Posts :
PL/SQL Arrays and nested tables ( Collections )
addAll method in java Collections
removeAll method in Collections framework
toArray method in Collections framework
retainAll method in Collections framework
   [will not be published]



^ <