Here you can find the source of subtractAsList(T[] array1, T[] array2)
public static <T> List<T> subtractAsList(T[] array1, T[] array2)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static <T> List<T> subtractAsList(T[] array1, T[] array2) { List<T> list = new ArrayList<>(Arrays.asList(array1)); list.removeAll(Arrays.asList(array2)); return list; }/* w w w . j a v a 2s . co m*/ }