I am currently able to get the total number of identical string value between my list of string using this.
Set<String> set = new HashSet<>(yourFriendList);
set.addAll(requestModelList.get(getAdapterPosition()).list);
int count = (yourFriendList.size() + requestModelList.get(getAdapterPosition()).list.size()) - set.size());
But now I want to get all of this identical value and put it in a new variable List.
List 1 : a b c d e f g
List 2 : a h i e d j k
identical count is 3 identical string are a d e;