Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?

Q

Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?

✍: Guest

A

Yes, it does. The FileNoFoundException is inherited from the IOException. Exception's subclasses have to be caught first.

2012-06-13, 2420👍, 0💬