今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Runtime exception: Unknown runtime exception
- [Instructor] So far, we know that runtime exceptions are unchecked exceptions, that we are not forced to handle by the compiler. Some example of these exceptions include the number format exception, arithmetic exception, and the no pointer exception. In this video, we will discuss how to handle other exceptions and other runtime exceptions that we may not know could occur or be able to anticipate. When an app is running in the wild or in production, we will likely know from experience to anticipate validating a user's input. We might want to check that they are providing an actual number and not a character to avoid the Null format exception, or check that a divisor is not zero to not cause an arithmetic exception. We can also do Null checks for any objects that could potentially trigger an NPE. However, there exists runtime exceptions that could occur that we will not be able to anticipate. When those exceptions pop up,…
内容
-
-
-
-
-
(已锁定)
What are runtime exceptions?2 分钟 28 秒
-
(已锁定)
Runtime exception: Return NumberFormatException to user9 分钟 25 秒
-
(已锁定)
Challenge: Handle an ArithmeticException3 分钟 59 秒
-
(已锁定)
Solution: Handle an ArithmeticException3 分钟 18 秒
-
(已锁定)
Runtime exception: Handling of NullPointerException6 分钟 16 秒
-
(已锁定)
Runtime exception: Unknown runtime exception4 分钟 18 秒
-
(已锁定)
Challenge: Handle potential runtime exceptions1 分钟 19 秒
-
(已锁定)
Solution: Handle potential runtime exceptions4 分钟 1 秒
-
(已锁定)
-