Getting all identical content between 2 List<String> : <p>I am currently able to get the total number of identical string value between my list of string using this.</p>

<pre><code> Set&lt;String&gt; set = new HashSet&lt;&gt;(yourFriendList);
        set.addAll(requestModelList.get(getAdapterPosition()).list);

 int count = (yourFriendList.size() + requestModelList.get(getAdapterPosition()).list.size()) - set.size());
</code></pre>

<p>But now I want to get all of this identical value and put it in a new variable List.</p>

<pre><code> List 1 : a b c d e f g
 List 2 : a h i e d j k
</code></pre>

<p>identical count is 3
identical string are a d e;</p>
