试题详情
- 单项选择题程序读入用户输入的一个值,要求创建一个自定义的异常,如果输入值大于10,使用throw语句显式地引发异常,异常输出信息为“something’s wrong!”, 语句为()。
A、if ( i > 10 ) throw Exception(“something’s wrong!”);
B、if ( i > 10 ) throw Exception e (“something’s wrong!”);
C、if ( i > 10 ) throw new Exception(“something’s wrong!”);
D、if ( i > 10 ) throw new Exception e ("something’s wrong!");
- C
关注下方微信公众号,在线模考后查看
热门试题
- 在J2EE中,对于简单属性来说,Bean
- 在J2EE中,aa.jsp文件如下:
- 在j2ee中,sax的解析过程是在xml
- 在J2EE中,以下是有关jsp:setP
- 在J2EE中,当使用以某主机地址为参数的
- 关于工厂模式描述正确的有()
- 在J2EE中,使用()选项中的代码,可
- 在J2EE中,假设sample.xml文
- Error和Exception下列说法正
- 在J2EE中,在my.xml中只有代码:
- Servlet服务结束,servlet会
- 在Java多线程中sleep()和wai
- 关于JAVA中数据类型描述正确的是()
- 对于布局管理器解释正确的有()。Q
- Struts中HTML标记的作用有()&
- 在J2EE服务器中部署了一个Web应用,
- 在Java语言中,小明在他的包mypac
- 在Java语言中,如果你想编写一个多线程
- 在J2EE中,对于ResultSet接口
- 在J2EE中,在提供名为sock的套接字