How can I easily check to see whether all the elements in one ArrayList are all elements of another ArrayList?
Use Collection.containsAll():
boolean isSubset = listA.containsAll(listB);
2.1m questions
2.1m answers
60 comments
57.0k users