Code example for LinkedHashSet

Methods: size, toArray

0
import java.util.LinkedHashSet; 
 
public class DuplicateRemoverImpl implements DuplicateRemover { 
	public String[] removeDuplicateStrings(String... array) {
		Collection<String> set;
		set = new LinkedHashSet<String>(Arrays.asList(array));
		return set.toArray(new String[set.size()]);
	} 
}