title: How to add one arraylist to other arraylist in android?
body: <p>I have created 3 arraylists and stored data in it. I need to pass one single arraydata to other page and so I have added my individual arrays to the main array. But when I added one array to other the data is not being aded to that array. Here is my code:</p>
  
  <pre><code>static ArrayList&lt;ArrayList&lt;String&gt;&gt; stringList1=new ArrayList&lt;ArrayList&lt;String&gt;&gt;();
  static ArrayList&lt;ArrayList&lt;String&gt;&gt; stringList3; 
  
  stringList1 = Mypage.stringList1;
  
   ArrayList&lt;String&gt; optionlist = new ArrayList&lt;String&gt;();
  stringList3 = new ArrayList&lt;ArrayList&lt;String&gt;&gt;();stringList3 = dbAdapter.selectRecordsFromDBList(query2, null); 
   for (int i = 0; i &lt; stringList3.size(); i++) {
      optionlist = stringList3.get(i);
      System.out.print("option list size");
      System.out.print(optionlist.size());
      stringList1.add(optionlist);
      System.out.println("total stringlist1"+stringList1.get(0));
  </code></pre>
  
  <p>I am getting the stringList1 array values from Mypage and accessing that in new page. In the new page I am trying to add the optionlist array to stringList1 by giving stringList1.add(optionlist) but the data is not adding. Where I went wrong? Please help me regarding this... Thanks in Advance</p>