contains() Method : Java.util.ArrayList

   

Declaration :

Explanation :

Purpose Method returns true if this list contains the specified element
Parameters obj ==> The element whose presence in this list is to be tested
Return Value True if this list contains the specified element
Exception NA

Example

The following example shows the usage of java.util.Arraylist.contains(E) method.

Output :