Programming learner
Programming learner

Reputation: 115

Requesting for missing files is what type of exception

Requesting for missing files is what type of exception. Is it checked or unchecked.

Upvotes: 0

Views: 506

Answers (2)

Balayesu Chilakalapudi
Balayesu Chilakalapudi

Reputation: 1406

When you get an exception at compile time of the program, it was a checked exception. Here file existence is verified by the jvm at compile time for processing the contents of this file.

Upvotes: 1

Daniel
Daniel

Reputation: 4549

If you mean the FileNotFoundException, the documentation shows it does not extend RuntimeException, so it is a checked exception. You can easily tell whether any exception is Checked or Unchecked by looking at what it extends. "Error" or "RuntimeException" are unchecked, and IIR everything else is checked.

Upvotes: 4

Related Questions