Aryan PrajapatKnowledge Contributor
What's the difference between a compile-time and a runtime exception?
What's the difference between a compile-time and a runtime exception?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
A checked exception is one that happens during the compilation process. This is an exception that cannot be overlooked and must be treated with caution. If you use the FileReader class to read data from a file and the file supplied in the class function Object() { [native code] } does not exist, you will get a FileNotFoundException, which you must handle. You’ll need to write the code in a try-catch block and then handle the exception. Unchecked exception, on the other hand, refers to an exception that happens at runtime.