How does JVM handles RuntimeException(s)

妖精的绣舞 提交于 2019-11-30 21:40:40

It doesn't. The only difference is in requirements enforced by the compiler.

You are mistaken that the JVM handles the exceptions differently, but your question is still valid if you are asking how the compiler treats them differently.

And this has a simple answer: the rule does not state that all subclasses of Exception are checked exceptions. Those which are also subclasses of RuntimeException are unchecked.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!