Q:

2 or more elements in one 2D array's space JAVA

I'm working on a project which requires putting 2 or more strings in one space in a 2D array. For example: from index i=0, j=0, store 4,5,6, and 7 in that particular space. 
I was thinking about using multidimensional array, but the problem is for the second array, the size (length) is not defined (in this case I use List or ArrayList). 
So the question is is there any array class/method to do this, or if I was to use ArrayList in a 2D String normal array, how would I create/add/print each String in that ArrayList

A:

In java, there's actually no such thing as a "multidimensional array", a two-dimensional array is an array of arrays, higher dimensions, arrays of arrays of arrays etc.  The only thing limiting the arrays to be the same size is that you initialize them as such. So you could easily store the information you wanted in a string[][][], using a technique called "jagged arrays".
You'd create the base array much like you would any other array, except you don't specify the size of the last dimension:
int[][][] myArray = new int[5][5][];

Then, you add arrays to the 2-d array to store data:
myArray[0][0] = new int[4];
myArray[0][0][0] = 4;   
myArray[0][0][1] = 5;
myArray[0][0][2] = 6;
myArray[0][0][3] = 7;

Then, if you wanted to store 6 elements in (0,1), you could say
myArray[0][1] = new int[6];
// set values

And so on for each of the other cells.  You can also resize the arrays the same way as you normally would:
myArray[2][3] = Arrays.copyOf(myArray[2][3],myArray[2][3].length + 1);

Hope this helps.
Edit
Following discussions in the comments, I came up with the following solution:
class MyContainer
{
    private Map<int, Map<int, List<string>>> data; //initialize in constructor

    public void setDataAt(int x, int y, List<string> value)
    {
        if (!data.ContainsKey(x))
        {
            data[x] = new HashMap<Map<int, Map<int, string>>();
        }
        if (!data[x].ContainsKey(y))
        {
            data[x] = new HashMap<int, string>();
        }
        data[x][y] = value;
    }
}

The important bit is checking at each level to ensure the data structure below exists, and creating it if it doesn't.  Of course, types can be changed, I used HashMap because I didn't know if datapoints will always be in order - and if you want to add by index, it's usually far easier than trying to use a List<>.

