单项选择题

关于以下初始化序列的执行结果的说法正确的是( )。 int index=1; int[] foo=new int[3]; int bar=foo[index]; int baz=bar+index;

A.baz的值为0
B.baz的值为1
C.编译通过,但产生异常
D.编译不能通过