June 2017
Beginner
1296 pages
69h 23m
English
... prompted for input. We’ll soon take a deeper look at how this flow of control works in exception handling.
catchIt’s relatively common for a try block to be followed by several catch blocks to handle various types of exceptions. If the bodies of several catch blocks are identical, you can use the multi-catch feature to catch those exception types in a single catch handler and perform the same task. The syntax for a multi-catch is:
catch (Type1 | Type2 | Type3 e)
Each exception type is separated from the next with a vertical ...
Read now
Unlock full access