There will often be occasions where you may need to catch more than one exception. You can have multiple catch statements with each one specifying a single exception class and then a code block for handling the exception. This could lead to a lot of redundant code. With a multi-catch statement you can catch multiple exceptions in the same statement.
A multi-catch statement looks like this:
catch ( NullPointerException | IndexOutOfBoundsException | InvalidArgumentException e) { ... }
In questa pagina del sito puoi guardare il video online Learn Java Programming - Exceptions: Multi-catch Tutorial della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Daniel Ross 16 settembre 2015, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 710 volte e gli è piaciuto 4 spettatori. Buona visione!