Here you can find the source of removeDuplicates(String[] first, String[] second)
public static List<String> removeDuplicates(String[] first, String[] second)
//package com.java2s; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static List<String> removeDuplicates(String[] first, String[] second) {/*from w w w .j a va2 s . c o m*/ List<String> result = new ArrayList<String>(Arrays.asList(first)); for (int i = 0; i < second.length; i++) { if (!result.contains(second[i])) { result.add(second[i]); } } return result; } }