What will be the reaction when a catch clause has no conditionals?

Lò Ngọc

New member
What will be the reaction when a catch clause has no conditionals?
A. Takes it to be 0
B. Takes it to be 1
C. Takes it to be true
D. Takes it to be false
 
Answer: c
Explanation: The try and catch statement handles some or all of the errors that may occur in a block of code, while still running code. If a catch clause has no conditional, it behaves as if it has the conditional if true, and it is always triggered if no clause before it was triggered.
 

Tìm kiếm

Back
Top