Probably the easiest way for any list would be:
listA.containsAll(listB) && listB.containsAll(listA)
More Related Contents:
- Removing duplicates from arraylist using set
- How to check two array list are same content in same position
- Logical disjunction of a list of booleans represented by integers [closed]
- ArrayList remove methods [closed]
- Assign ArrayList to File[] in java
- ArrayList, Loop and requisite if can not work that i want – Java 11
- Android String that change every day
- How do I remove repeated elements from ArrayList?
- Sorting an ArrayList of objects using a custom sorting order
- Best way to convert an ArrayList to a string
- How to convert an ArrayList containing Integers to primitive int array?
- How does a ArrayList’s contains() method evaluate objects?
- Common elements in two lists
- Concurrent Modification Exception : adding to an ArrayList
- How to sort an ArrayList using multiple sorting criteria?
- How to convert a String into an ArrayList?
- ArrayList filter [duplicate]
- Searching in a ArrayList with custom objects for certain strings
- java.util.Vector – alternatives
- Fastest way to recreate the ArrayList in a for loop
- How to insert an object in an ArrayList at a specific position
- Removing Duplicate Values from ArrayList
- ArrayList or List declaration in Java
- Arrays.asList() of an array
- How does ArrayList work?
- Create an array of ArrayList elements
- Removing object from ArrayList in for each loop
- ArrayList Generic without Type
- Iterate ArrayList in JSP
- Passing ArrayList of string arrays from one activity to another in android