123456789101112131415



Question 1: class Test{
public static void main(String[] args) {
Object obj = new int[] { 1, 2, 3 };
int[] someArray = (int[])obj;
for (int i : someArray) System.out.print(i + " ");
}
}

What is the result?

1. 1 2 3
2. Compilation fails because of an error in line 12.
3. Compilation fails because of an error in line 13.
4. A ClassCastException is thrown at runtime.