I have two lists (arraylists) and I would like to know effective way to check number of elements of List A present in List B.
List<String> listA = new ArrayList<>();
List<String> listB = new ArrayList<>();
I would like to know how many elements in listA are present in listB
I can loop over and check but I am looking for an effective and fastest way I can do using java 1.8
Thanks for help.