Here you can find the source of remove(String[] initial, String... toExclude)
public static String[] remove(String[] initial, String... toExclude)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static String[] remove(String[] initial, String... toExclude) { List<String> result = new ArrayList<String>(); result.addAll(Arrays.asList(initial)); result.removeAll(Arrays.asList(toExclude)); return result.toArray(new String[result.size()]); }/*from w ww . j a va2 s . com*/ public static int[] toArray(Collection<Integer> result) { int[] array = new int[result.size()]; int index = 0; for (Integer month : result) { array[index++] = month; } return array; } }