contains() in Java. ArrayList contains() method in Java is used for checking if the specified element exists in the given list or not . Returns: It returns true if the specified element is found in the list else it returns false.
contains() in Java. ArrayList contains() method in Java is used for checking if the specified element exists in the given list or not . Returns: It returns true if the specified element is found in the list else it returns false.