PrepAway - Latest Free Exam Questions & Answers

} ~|~ (Select all that apply)

A developer can use optional catch statements for any exception type in a try-catch block.

However, the general exception type, ‘Exception’, must only be used by the last catch() block.
EXAMPLE:
try{
// Some risky code.
}
catch(SomeExceptionType e){
// Handle one exception type.
}
catch(SomeOtherExceptionType e){
// Handle another exception type.
}
catch(Exception e){
// This must be the last catch block.
}
~|~
(Select all that apply)

PrepAway - Latest Free Exam Questions & Answers

A.
Make calls to methods using both valid and invalid inputs.

B.
In the case of conditional logic (including ternary operators), execute each branch of code logic.

C.
Only test code using the System Administrator profile.

D.
Focus solely on test coverage percentage score.

E.
Complete successfully without throwing any exceptions, unless those errors are expected and
caught in a try…catch block.

F.
None of these

2 Comments on “} ~|~ (Select all that apply)

  1. a says:

    This makes no sense, however I know the generic Exception can only by caught in the last block. Wouldn’t make sense if it was the second to last block is then the last block would be useless




    0



    0

Leave a Reply