Ok, I have List a and List b
is there a way to check that no value exist between the two?
List a // 1,2,4,5
List B // 1,6,7,8
Between both list // 1    FAILURE
Collections.disjoint(list1, list2)
returns true if they have no elements in common.
Use Collections.disjoint.
Returns true if the two specified collections have no elements in common
boolean hasCommonElements = Collections.disjoint(listA, listB);
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With