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: 
It's not that Java doesn't check the IndexOutOfBoundsException. It's that the answer SHOULD be zero. The key line is 

```
shatner[0] = rat;

```

Since that means that the 0th index of `shatner` is pointing to an array of length 4, `shatner[0][4]` is totally valid.
Arrays need not be rectangular in Java. This is a jagged array and is perfectly fine.