- 40
- 0
- 约8.81千字
- 约 20页
- 2017-07-08 发布于湖北
- 举报
作业一一、单项选择题(共10道小题,共100.0分) 设有如下程序public class Try2 {?????? public static void main(String[] args) {????????????? Try2 obj = new Try2();????????????? obj.test();?????? }?????? ?????? void oneMethod() {????????????? int a [] = {1, 2, 3};????????????? System.out.println(a[3]);?????? }?????? ?????? public void test() {????????????? try {???????????????????? oneMethod( );???????????????????? System.out.println(condition 1);????????????? }????????????? catch (ArrayIndexOutOfBoundsException e) {???????????????????? System.out.println(condition 2);????????????? }????????????? catch (Exception e) {???????????????????? System.out.println(condition 3);????????????? }????????????? finally {???????????????????? System.out.println(finally);????????????? }?????? }}则程序的输出结果的是(? )condition 1finally condition 2finally condition 3finally 3aondition 1finally 知识点:阶段作业二学生答案:[B;]??得分:[10]试题分值:10.0提示:?设有如下程序public class Try2 {?????? public static void main(String[] args) {????????????? Try2 obj = new Try2();????????????? obj.test();?????? }?????? ?????? void oneMethod() { }?????? ?????? public void test() {????????????? try {???????????????????? oneMethod( );???????????????????? System.out.println(condition 1);????????????? }????????????? catch (ArrayIndexOutOfBoundsException e) {???????????????????? System.out.println(condition 2);????????????? }????????????? catch (Exception e) {???????????????????? System.out.println(condition 3);????????????? }????????????? finally {???????????????????? System.out.println(finally);????????????? }?????? }}则程序的输出结果的是(? )condition 1 condition 1finally condition 1condition 2condition 3 condition 1condition 2condition 3finally 知识点:阶段作业二学生答案:[B;]??得分:[10]试题分值:10.0提示:?给定下面程序段class Equals {??? public static void main(String args[]) {??????? int x = 100;??????? double y = 100.1;??????? boolean b = ( x = y );??????? System.out.println(b);??? }}??? 下面选项正确的是(? )输出:true?? 输出:flase 编译失败抛出一个运行时异常知识点:阶段作业二学生答案:[C;]??得分:[10]试题分值:10.0提示:?(错误)下面不属于“异常”现象的是(? )程序创建对象时没有足够
您可能关注的文档
最近下载
- 个人简历表格填写2021简历模板.docx VIP
- 针灸推拿学习题库(附答案).docx VIP
- 毕业设计(论文)-五边形凸台零件铣削加工.doc VIP
- 2026届山东省淄博市高三上学期期末考试(摸底质量检测)历史试题(含答案).docx VIP
- 常见词组固定搭配.pdf VIP
- 2023年山东泰安中考地理试题及答案.pdf VIP
- 胎动管理专家共识最新2025.pptx
- (小学综合实践课标复习题全.doc VIP
- 0—3岁婴幼儿心理发展与教育 第四章 0-3岁婴幼儿心理发展与教育 课件PPT.pptx VIP
- 0—3岁婴幼儿心理发展与教育 第三章 0-3岁婴幼儿心理发展与教育 课件PPT.pptx VIP
原创力文档

文档评论(0)