varying length is not a problem, the new opreator will auto-allocate the heap memory for you, e.g.
int[][] jagged = new int[2][];
jagged[0] = new int[len1];
jagged[1] = new int[len2];
however, if the array will grow or contract during runtime, then you may have to use arraylist. :(