# VBForums CodeBank > CodeBank - Java / J# >  Java - Two Collections. The same elements or have no elements in common

## Dillinger4

Two methods are needed in this case.


```
boolean containsAll(Collection<?> c)
boolean disjoint(Collection<?>c1 Collection<?>c2)
```

Since [i]containsAll(Collection<?> c)[i] is defined within the _Collection_ interface all concrete implementations will be able to use this method. _disjoint(Collection<?>c1 Collection<?>c2)_ is defined within the _Collections_ class.

Using both of these methods is pretty straight forward. _containsAll(Collection<?> c)_ is an instance method so naturally it must be invoked on an object. _disjoint(Collection<?>c1 Collection<?>c2)_ is defined as Static within the _Collections_ class so all that is needed is to invoke it using the class name ie _Collections.disjoint(Collection<?>c1 Collection<?>c2)_.

----------

