title: How to get Arraylist Value and Store into another arraylist
body: <blockquote>
    <p>I know this is silly but i am stuck this problem.i have try this but
    not get desired result so i am ask this question: My question is</p>
  </blockquote>
  
  <p>scenerio:1</p>
  
  <pre><code>  ArrayList&lt;String&gt; f = new ArrayList&lt;String&gt;();
          f.add("a");
          f.add("b");
          f.add("c");
  
          ArrayList&lt;String&gt; s = new ArrayList&lt;String&gt;();
          s.add("a");
          s.add("a");
          s.add("a");
          s.add("b");
          s.add("b");
          s.add("b");
          s.add("c");
          s.add("c");
      s.add("c");
  </code></pre>
  
  <blockquote>
    <p>Now i want common value first arraylist and second arraylist
       And i want result is like:</p>
  </blockquote>
  
  <pre><code>ArrayList&lt;String&gt; temp = new ArrayList&lt;String&gt;();//this is temp arraylist to store but here i didt use it
  </code></pre>
  
  <blockquote>
  <pre><code>   ___
      a
     ___
      a
      a
      a
     ___
      b
     ___
      b
      b
      b
     ___
      c
     ___
      c
      c
      c
  </code></pre>
  </blockquote>
  
  <p>and saw like this .how can i solve this freinds Thanks in Advance freinds.</p>