JAVA中的Runtime异常

最看在看一些安卓图形绘制的代码,看到一个函数的注释里提到了Runtime这个概念:


JAVA中的Runtime异常_第1张图片
一些代码中的注释



Runtime是运行时的意思,Runtime Error就是运行时错误,就是在运行期间出现的错误。 

An error that occurs during the execution of a program. In contrast, compile-time errors occur while a program is being compiled. Runtime errors indicate bugs in the program or problems that the designers had anticipated but could do nothing about. For example, running out of memory will often cause a runtime error.(运行时错误是程序执行期间发生的错误,它不同于编译期间发生的错误.运行时错误可能是程序中的毛病引起的,也可能程序并无错误,例如机器存储器不够引起) 

Note that runtime errors differ from bombs or crashes in that you can often recover gracefully from a runtime error.(运行时错误不同于炸弹或系统垮掉,运行时错误一般不影响操作系统运行) 

具体的运行错误,要参照错误信息,分析后,想办法解决. 

你可能感兴趣的:(JAVA中的Runtime异常)