There are two TreeSets in my app:
TreeSet
set1 = {501,502,503,504} set2 = {502,503,504,505}
I want to get the symmetric difference of thes
You could use CollectionUtils#disjunction
EDIT:
Alternatively with less pre-Java-5-ness, use Guava Sets#symmetricDifference