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
There is nothing going out of bounds.

The 0th row in the `shatner` array gets reinitialized to `int[4]`.