Compile Time & Run Time Error
<pre><code>class Dims {
    public static void main(String[] args) {
        int[][] a = {{1,2,}, {3,4}};
        int[] b = (int[]) a[1];
        Object o1 = a;
        int[][] a2 = (int[][]) o1;
        int[] b2 = (int[]) o1;   // Line 7
        System.out.println(b[1]);
    } 
}  
</code></pre>

<p>I have a doubt in the above piece of code in Java.<br>
Why does it give a Runtime Exception and not a compile time error at line number 7?</p>
