Check if an ArrayList contains every element from another ArrayList

There is a method called containsAll declared in the java.util.Collection interface. In your setting one.containsAll(two) gives the desired answer.

Leave a Comment