暂无介绍
编程时可能会出错。程序中的错误会产生意外的结果,也可能会终止程序的执行。因此,正确地检测和管理错误,才能正确地执行程序。错误可以有两种类型。它们是编译时错误和运行时错误。当有语法错误时,由Java编译器指示。这些被称为编译时错误。一些常见的编译时错误包括缺少分号、缺少大括号、未声明的变量以及拼写错误的标识符或关键字。有时,程序可以正确编译,但它可能会给出错误的输出。它们被称为运行时错误。一些常见的...