Filter an array by comparing another array private static Set intersect(Set set1, Set set2) { return set1.stream() .filter(set2::contains) .collect(toSet()); }
This blog is made specially for students those who have selected Computer Application (165) as a subject in CBSE board exam. It includes chapter wise notes, videos, assignments, etc.