Android String Remove removeDuplicates(String[] first, String[] second)

Here you can find the source of removeDuplicates(String[] first, String[] second)

Description

remove Duplicates

Declaration

public static List<String> removeDuplicates(String[] first,
            String[] second) 

Method Source Code

//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;
    }
}

Related

  1. removeAccents(String string)
  2. removeBackslashes(String content)
  3. removeSpace(String str)
  4. removeSuffix(String str, String suffix)
  5. removeWhitespace(String str)
  6. rmvSpace(String baseStr)