课程: Java Exception Handling

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

What are runtime exceptions?

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,…

内容