Wouldn’t Collections.disjoint(A, B)
work? From the documentation:
Returns
true
if the two specified collections have no elements in common.
Thus, the method returns false
if the collections contains any common elements.
More Related Contents:
- Hibernate vs JPA vs JDO – pros and cons of each? [closed]
- Java remote debugging, how does it work technically?
- Visual Studio Code showing “Java 11 or more recent is required to run. Please download and install a recent JDK”
- Why has javax.persistence-api been replaced by jakarta.persistence-api in spring data jpa starter?
- Gson turn an array of data objects into json – Android
- Should all methods be static if their class has no member variables
- PorterduffXfermode: Clear a section of a bitmap
- Call a child class method from a parent class object
- Is it possible to get next element in the Stream?
- java.lang.IllegalStateException: No transactional EntityManager available
- Unity3D and Android Studio Integration
- Hibernate Criteria API: get n random rows
- Benchmarking inside Java code
- Array List of objects via intent
- JMS queue with multiple consumers
- How to split a huge zip file into multiple volumes?
- What is the implicit ID of a maven plugin execution?
- How do I unescape a JSON String using Java/Jackson?
- How to stream mp3 using pure Java
- How do I declare a static variable inside the Main method?
- Copy POJO content from one bean to another
- calling thread.start() within its own constructor [duplicate]
- how to make a jtextfield having a fixed date format?
- log4j migration to log4j2
- how to print selected rows JTable
- Why use Gradle instead of Ant or Maven? [closed]
- How do I convert from int to Long in Java?
- What’s the difference between ZonedDateTime and OffsetDateTime?
- Java Serial Communication on Windows
- Why can’t my subclass access a protected variable of its superclass, when it’s in a different package?