DEVFYI - Developer Resource - FYI

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

Java Interview Questions and Answers (part 1)


(Continued from previous question...)

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

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

(Continued on next question...)

Other Interview Questions