Why is the catch parameter implicitly final?

catch (IOException|SQLException ex) { logger.log(ex); throw ex; } 

is that why ex implicitly definitive? What is the use of make implicitly definitively?

+4
source share
1 answer

This is implicitly final because you do not need to modify the object that ex points to, especially in this case, when it can be either an IOException or SQLException , and thus the typing assignment will be difficult to determine by the compiler.

+7
source

All Articles