Learn Java Programming - Exceptions: Multi-catch Tutorial

Publicado el: 16 septiembre 2015
en el canal de: Daniel Ross
710
4

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) { ... }


En esta página del sitio puede ver el video en línea Learn Java Programming - Exceptions: Multi-catch Tutorial de Duración hora minuto segunda en buena calidad , que subió el usuario Daniel Ross 16 septiembre 2015, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 710 veces y le gustó 4 a los espectadores. Disfruta viendo!