Multiple choice

A programmer has created his own exception for balance in account <1000. The exception is created properly, and the other parts of the programs are correctly defined. Though the program is running but error message has not been displayed. Why did this happen?

  1. Because of the Throw portion of exception.

  2. Because of the Catch portion of exception.

  3. Because of the main() portion.

  4. Because of the class portion.

  5. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Though exception is opened and it is generating the exception also but since catch is missing, so the error is not acknowledged and displayed.