试题详情
- 单项选择题 public class Test { public static void main(String[] args) { int x = 0; assert (x > 0) ? “assertion failed” : “assertion passed”; System.out.println(“Finished”); } } What is the result?()
A、 finished
B、 Compilation fails.
C、 An AssertionError is thrown and finished is output.
D、 An AssertionError is thrown with the message “assertion failed”.
E、 An AssertionError is thrown with the message “assertion passed”.
- B
关注下方微信公众号,在线模考后查看
热门试题
- Which three&ens
- 编写一个Java程序将当100,101,
- Which expressi
- public class&e
- 下列哪项不属于Java语言的基本数据类型
- Which two̳
- 已知: 则输出为()
- Internet的网络层含有的协议是()
- 1. class
- 以下可以正确获取结果集的有()。
- The sl:shoppin
- public class&e
- 已知: 要使Derived通过编译需要
- Given an
- Which code&ensp
- public class&e
- 在JAVA程序中,类是由定义和主体构成的
- 已知: 下面哪个定义是合法的()
- Which construc
- public class&e