Question: ```
public static void main(String[] args)
{
    int [][]shatner = new int[1][1];
    int []rat = new int[4];
    shatner[0] = rat;
    System.out.println(shatner[0][3]);
}    

```

surprised, The output is 0, why Java doesn't check this kind of indexOutOfBound error?

Answer: 
Where do you see an "indexOutOfBound error"? The code does the following:

* Initalize an array (size 1) of `int` arrays (size 1), i.e. a 2D array, contents are intialized with 0
* Initalize a array of `int`, size 4, content is intialized with 0
* set the single element of the 2D array to the size 4 1D array
* access the last element of the first array in the 2D array, which is 0
I'm thinking it's because java's arrays are working a bit differently than expected. You initialize `shatner` to [1][1], meaning something like, `{{0},{0}}` in memory.

However, you then assign an integer to the first element, turning it into `{{0,0,0,0},{0}}` in memory, so Java is addressing the newly assigned index.