I have List of Lists(list rows contain list column). I want to sort my rows in ListRZS by length(.size()).
[[123, 189, 277], [11], [145, 211, 299], [156, 222, 310], [167, 233, 255], [189, 266], [200, 277], [211, 288], [245, 299], [233], [244]]
Shoul be:
[[11], [233], [244], [189, 266],[200, 277], [211, 288], [245, 299], [123, 189, 277], [145, 211, 299], [156, 222, 310], [167, 233, 255]]
Question: How to write working comporator/comparable for this situation.
public class Start {
public static void main(String[] args) {
    System.out.println("Start reading from Xls");
    ReaderXls1Column read = new ReaderXls1Column();
    ReaderXls readrzs = new ReaderXls();
    List<String> listASU = new ArrayList<String>(read.ReaderXls1Column("Text1obj",0,1));                        // Creating Lists
    List<List<String>>  listRZS = new ArrayList<List<String>>(readrzs.ReadXls("Text1obj",2,12));
    System.out.println(listASU);
    System.out.println(listRZS);
    System.out.println("Reading is over");
    System.out.println(listRZS);
    WriterXls.main("Text1obj",listRZS);
    System.out.println("Writing is over");
}
My attempt without comparator, comparable(of course, not working right)
        int k=0;
    while ( k<listRZS.size()){
        for (int j=0;j<10;j++)     {
            List<String> tmplist = new ArrayList<String>();
            if (listRZS.get(k).size()>listRZS.get(k+1).size()) {Collections.copy(listRZS.get(k),tmplist); listRZS.remove(k); listRZS.add(k+1,tmplist);}
            else {};
        }
        Collections.sort(listRZS.get(k));       // sort each row, solution above
        k++;
    }
 
     
     
    