Here you can find the source of isArrayIntersect(Object[] objArr1, Object[] objArr2)
public static boolean isArrayIntersect(Object[] objArr1, Object[] objArr2)
//package com.java2s; //License from project: Apache License import java.util.Arrays; import java.util.List; public class Main { public static boolean isArrayIntersect(Object[] objArr1, Object[] objArr2) {/* ww w . j a v a 2 s .c o m*/ return isListIntersect(Arrays.asList(objArr1), Arrays.asList(objArr2)); } public static boolean isListIntersect(List list1, List list2) { for (int i = 0; i < list1.size(); i++) if (list2.contains(list1.get(i))) return true; return false; } }