今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
What are runtime exceptions?
- [Instructor] We have covered throwables and exceptions in a broader scope so far in this course. This chapter, we will dive into examples of runtime exceptions. In this video, we revisit what runtime exceptions are. Runtime exceptions are unchecked exceptions. This means our JVM or the Java Virtual Machine does not check for these exceptions at compile time when code is compiled. Apps will likely not be able to automatically recover from an unchecked exception as they are not always anticipated when writing the code. If you recall, unchecked exceptions do not have to be declared in a methods header like checked exceptions. Of all of the different runtime exceptions, NullPointerExceptions or NPEs for short are probably the most popular runtime exceptions. They can occur anytime an action is attempted on an object that is null. If a method forgets to initiate a string variable and attempts to use that variable in some way,…
内容
-
-
-
-
-
(已锁定)
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 秒
-
(已锁定)
-