文档详情

面向对象程序设计知到智慧树期末考试答案题库2024年秋山东建筑大学.docx

发布:2024-12-26约7.66千字共7页下载文档
文本预览下载声明

面向对象程序设计知到智慧树期末考试答案题库2024年秋山东建筑大学

以下程序执行后,抛出的异常是()。

A:ArithmeticExceptionB:空指针异常(NullPointerException)C:ArrayIndexOutOfBoundsExceptionD:其余选项均对

答案:ArrayIndexOutOfBoundsException

已知TestClass.java的定义如下:publicclassTestClass{???static?inta=10;???intb=20;???publicTestClass(){??????a++;b++;???}??

显示全部
相似文档