Here you can find the source of isListIntersect(List list1, List list2)
public static boolean isListIntersect(List list1, List list2)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { 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; }/* w w w . j av a2 s . c o m*/ }