In a chunk of code where something can go wrong, what can you do to help protect
Fantastic news! We've Found the answer you've been seeking!
Question:
In a chunk of code where something can go wrong, what can you do to help protect the program from crashing? Select all that apply.
Ensure the method containing this chunk of code contains the "protected" access modifier.
Place the chunk of code into a "try" block, and add a "catch" block to do something different if an exception occurs.
Create an "exception" block and place this chunk of code into it. Add a "throw" block afterward to do something different if an exception occurs.
Use if/else statements to ensure certain lines of code do not execute if it would lead to an exception or error.
Related Book For
Customer Service Career Success Through Customer Loyalty
ISBN: 978-0133056259
6th edition
Authors: Paul R. Timm
Posted Date: