3 ms·
I think it is a fair example: both NumberFormatException and IOException are checked exceptions, so the code will fail to compile if they're not caught.
by hythloday 15y ago
I think it is a fair example: both NumberFormatException and IOException are checked exceptions, so the code will fail to compile if they're not caught.
- anonova 15y agoDespite being checked, they do not necessarily have to be caught if you add a `throws` clause in the method declaration.