20.9k views
2 votes
Within the try clause of a try statement, you code a. all the statements of the program b. a block of statements that might cause an exception c. a block of the statements that are most likely to cause an exception d. only the statements that might cause an exception

User Szenis
by
8.7k points

1 Answer

4 votes

Answer:

B) A block of statement that might cause an exception.

Step-by-step explanation:

Exception handling is a good programming technique that prevents our program from crashing when an exception occurs during execution. The try clause is used with a catch to handle any exception that might occur, so whenever a statement that might cause an exception is to be used, this should be contained in a try statement block of code.

User Alesss
by
7.5k points