current position:Home>2. If there are multiple catches in a program segment, which of the following conditions will the program execute?

2. If there are multiple catches in a program segment, which of the following conditions will the program execute?

2022-02-02 21:13:36 CSDN Q & A

If there are more than one in a program segment catch, Then the program will be executed according to which of the following conditions ?( )
A、 After finding the appropriate exception type, continue to execute the following catch
B、 Find every eligible catch It's all done once .
C、 After finding the appropriate exception type, the following... Will not be executed catch
D、 Find and in order catch The first of the exception type matches catch Block execution , If finally Blocks must be executed .




Refer to the answer 1:

D




Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202022113339755.html

Random recommended