To check if an ArrayList object contains the specified element we can use the contains(Object o) method . This method returns a boolean true when the specified element is found in the ArrayList , otherwise return false .
To check if an ArrayList object contains the specified element we can use the contains(Object o) method . This method returns a boolean true when the specified element is found in the ArrayList , otherwise return false .