Given:
10. public class Foo {
11. static int[] a;
12. static { a[0]=2; }
13. public static void main( String[] args ) {}
14. }
Which exception or error will be thrown when a programmer attempts to run this code?
A.
java.lang.IllegalStateException
B.
java.lang.ArrayIndexOutOfBoundsException
C.
java.lang.StackOverflowError
D.
java.lang.ExceptionInInitializerError