下面抛出异常语句正确的是()。

下面抛出异常语句正确的是()。

A.throws new ArrayIndexOutOfBoundsException(“数组访问下标越界啦“);

B.throw new ArrayIndexOutOfBoundsException(“数组访问下标越界啦“);

C.throwArrayIndexOutOfBoundsException;

D.throwsArrayIndexOutOfBoundsException;

正确答案:throw new ArrayIndexOutOfBoundsException(“数组访问下标越界啦“);

猜你喜欢