java 2 lists anymatch code example Example: java 8 anymatch two lists boolean isAnyMatch = list2.stream().anyMatch(list1::contains);