Codekru

ArrayList contains() and ContainsAll() method in Java

This post will discuss the contains() and containsAll() methods implemented in the ArrayList class. They are used to check whether an ArrayList contains a specified element/Collection or not. public boolean contains(Object o) public boolean containsAll(Collection c) Let’s discuss them one by one. public boolean contains(Object o) What does it do? It will check whether the

ArrayList contains() and ContainsAll() method in Java Read More »