I already know how to create an array of different lengths in Java if I know the format of the array at compile time.
Ex:
char[][] array = { { 'a', 'b', 'c'}, {'d'}, {'e', 'f'}}; //etc....
The problem is that i need that made at runtime. I don't know the size I'll need for the array at compile time but I'll know it at runtime.
The objective here is to make in java (and have the advantages of arrays in java (like the .length)) to make what in C would be:
char[][] arrayC = malloc(outerArraySize);
for(int i = 0; i < outerArraySize; i++){
arrayC[i] = malloc(innerArraySize[i]);
}
This C code was made here ad-hoc so it may contain errors but it's purpose is just to clarify the question message.
Anyway of doing this properly in Java?