title: sort an arraylist of arraylist of integers
body: <p>I am looking to sort an arraylist of arraylist of integers and I require help?</p>
  
  <p>I was informed that I need to implement comparator or comparable and then use the collection.sort to sort the list of list in order...</p>
  
  <pre><code>ArrayList&lt;ArrayList&lt;Integer&gt;&gt; g = new ArrayList&lt;ArrayList&lt;Integer&gt;&gt;()
  
  If you look at the list of list as the following example:
  C1 – 5,4,10
  C2 – 3,2,1
  C3 – 7,8,6
  First it will be sorted like this:
  C1 – 4,5,10
  C2 – 1,2,3
  C3 – 6,7,8
  Then it will be sorted like this
  C1 – 1,2,3
  C2 – 4,5,6
  C3 – 7,8,10
  </code></pre>