Skip to content

Commit 24ba63b

Browse files
committed
clarification
1 parent 6e2388a commit 24ba63b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

source/ch4_conditionals.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ The <c>switch</c> statement is not used very often, and we recommend you do not
381381
</table>
382382

383383
<p>
384-
Next, we will look into the <c>try-catch</c> blocks themselves. As with most other structures in Java, the blocks must be encased with braces <c>{}</c>. The most important part of this code is, after <c>catch</c>, there is a set of parenthesis with an exception type and a variable name <c>catch (InputMismatchException e)</c>. This is where we declare a <c>InputMismatchException</c> exception and name it with the variable name <c>e</c>. It is common practice to name exception variables <c>e</c> in this manner.
384+
Note that as with other structures in Java, <c>try-catch</c> blocks blocks must be encased with braces <c>{}</c>. The most important part of this code is, after <c>catch</c>, there is a set of parenthesis with an exception type and a variable name <c>catch (InputMismatchException e)</c>. This is where we declare a <c>InputMismatchException</c> exception and name it with the variable name <c>e</c>. It is common practice, though not a requirement, to name exception variables <c>e</c> in this manner.
385385
</p>
386386

387387
</section>

0 commit comments

Comments
 (0)