Ask Question

A program to illustrate exceptional handling

+3
Answers (1)
  1. 8 October, 05:35
    0
    You surround your part of the program that can throw exceptions with a

    try { ... } block and place a catch ( ...) { ... } directly below it.

    You could put code in the try block that divides by zero to see an exception in action. Alternatively, you can throw one yourself using the throw keyword.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “A program to illustrate exceptional handling ...” 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