今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
What are exceptions?
- [Instructor] We will discuss unchecked and checked exceptions, and specific examples of each. As a refresher, an exception is another object that can be thrown, and indicate conditions that an app might want to catch. There are two types to the exception object, checked exceptions and unchecked exceptions, also known as runtime exceptions. Checked exceptions are throwables in Java that are checked at compile time. This means any checked exceptions must be declared in the method hitter or be caught and handled. If a checked exception could potentially occur in a method or class, and that exception is not handled, the code will not build or compile, which means your app will not start at all. Apps can potentially catch exceptions, change some aspects of the code at runtime, and continue to work without some kind of intervention. IOExceptions are checked exceptions that can occur when there's an issue with input or output.…