InterviewSolution
Saved Bookmarks
| 1. |
To catch more than one exception in one catch block, how are the exceptions separated in the syntax?(a) Vertical bar(b) Hyphen(c) Plus(d) Modulus |
|
Answer» Correct choice is (a) Vertical bar To explain I would say: Just the way we separate the arguments in a function definition using comma. Here we separate the exceptions by using a vertical bar or we call it pipe symbol sometimes. This is just a convention followed to separate different exception list. |
|