Home / Questions / Does it matter in what order catch statements for FileNotFoundException and IOException are written?
Explanatory Question

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

👁 1,438 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

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