title: How to add string arrays to array list
body: <p>I'm trying to create an array list of arrays. When I'm done, I want the array list to look like this: </p>
  
  <pre><code>[ [Mary] , [Martha,Maggie,Molly] ]
  </code></pre>
  
  <p>I'm trying to accomplish this by first defining "Mary" as a string array of length 1, and defining "Martha, Maggie, Molly" as a string array of length three. Then I attempt to add these arrays to an array list. But alas, the array list will not accept the arrays. Take a look:</p>
  
  <pre><code>String[] s1 = new String[1];
  String[] s3 = new String[3];
  
  ArrayList&lt;String[]&gt; list1 = new ArrayList&lt;String[]&gt;();
  
  s1[0]="Mary";
  s3[0]="Martha";
  s3[1]="Maggie";
  s3[2]="Molly";
  
  list1.add(s1[0]);
  list1.add(s3[0]);
  list1.add(s3[1]);
  list1.add(s3[2]);
  </code></pre>
  
  <p>Any ideas on how I can add these arrays to list1, in order to form an array list of arrays?</p>