当前位置:OCJP(310-065)题库

问题:

[单选]

Given a method that must ensure that its parameter is not null:
11. public void someMethod(Object value) {
12. // check for null value
...
20. System.out.println(value.getClass());
21. }
What inserted at line 12, is the appropriate way to handle a null value?()

A . assert value == null;
B . assert value != null, "value is null";
C . if (value == null) { throw new AssertionException("value is null"); }
D . if (value == null) { throw new IllegalArgumentException("value is null"); }

电流互感器在运行中必须使()。 铁芯及二次线圈牢固接地。 铁心两点接地。 二次线圈不接地。 电压互感器二次回路为什么必须接地? Which two files in the database can be configured for automatic backups by using the autobackupfeature in Recovery Manager (RMAN)() data files。 control files。 parameter file。 online redo log files。 server parameter file。 下面哪句话比较准确地定义了Delphi() 面向对象的可视化的开发环境。 多媒体制作工具。 数据库的客户端开发工具。 高级编程语言。 管道封堵作业时,通过()来操作夹板阀。 气动。 液压或手动。 电动。 液动。

Given a method that must ensure that its parameter is not null:
11. public void someMethod(Object value) {
12. // check for null value
...
20. System.out.println(value.getClass());
21. }
What inserted at line 12, is the appropriate way to handle a null value?()

参考答案:

  参考解析

本题暂无解析

在线 客服