Ask Question

Which of the following statements is true? The try block contains the code that handles the exception if one occurs. When a try block terminates, any variables declared in the try block are preserved. You can have many catch blocks to handle different types of exceptions. The catch block contains the code that might throw an exception.

+5
Answers (1)
  1. 27 October, 11:24
    0
    You can have many catch blocks to handle different types of exceptions.

    Explanation:

    In programming, catch and try are blocks of codes that are written to handle errors. While the try block of code will allow for the definition of code blocks which are tested for errors, the catch block of code allows the programmer to define the block of code to be executed if an error occurs in the try block ... somewhat like the if ... else statements. since there could be different error handling scenarios, one can have as many catch blocks for different error exceptions
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Which of the following statements is true? The try block contains the code that handles the exception if one occurs. When a try block ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers