boolean retainAll(Collection<?> c)
Retains only the elements in this collection that are contained in the specified collection (optional operation). In other words, removes from this collection all of its elements that are not contained in the specified collection.
gegeben ist
Code:
Collection c1 = blabla;
Collection c2 = blablubb;
Code:
//Variante 1
c1 = c1.retainAll(c2);
//Variante 2
c1 = c2;
verstehe den Sinn dieser Methode gerade nciht ganz ???:L