Leave a Reply 5

Your email address will not be published. Required fields are marked *


skywalker

skywalker

Correct answer is B.

derek

derek

I think the answer is D,because the static method dispResult doesn’t have a throws exception signature, the main method can’t catch the ArithmeticException. Since the method dispResult has catch the ArithmeticException, the program will complete run. It will execute the Line which print “Done” after printing “first exception”

derek

derek

I was wrong, the correct answer is B

Biljana

Biljana

B
num[1]-num[2]throws Exception java.lang.ArrayIndexOutOfBoundsException: 2
main can handle exception