Java: Remove Duplicates In Vector

Either you do this

Vector newVect = new Vector(new LinkedHashSet(originalVect));

or this, if you do not need a new Vector object created

Collection noDup = new LinkedHashSet(emails);
emails.clear();
emails.addAll(noDup);

Donations appreciated. Every little $ helps. Or click Google +1. Or play the short video on the upper right of this page.

Related Posts Plugin for WordPress, Blogger...