Consider the following class hierarchy from the package javax.security.auth.login and answer the questions.
LoginException/*from ww w . ja v a 2s . com*/ + | AccountException + | AccountExpiredException + | AccountLockedException + | AccountNotFoundException
Which of the following handlers that makes use of multi-catch exception handler feature will compile without errors?
C.
For A and B, the base type handler is provided with the derived type handler, hence the multicatch
is incorrect.
For D, the exception name exception1 is redundant and will result in a syntax error.
C is the correct option and this will compile fine without errors.