试题详情
- 单项选择题 public class foo { public static void main (Stringargs) { String s; system.out.printIn (“s=” + s); } } What is the result?()
A、 The code compiles and “s=” is printed.
B、 The code compiles and “s=null” is printed.
C、 The code does not compile because string s is not initialized.
D、 The code does not compile because string s cannot be referenced.
E、 The code compiles, but a NullPointerException is thrown when toString is called.
- C
关注下方微信公众号,在线模考后查看
热门试题
- 辗转相除法:从键盘输入两个数512113
- 表格包型布局有哪些约束类型?()
- 1. public&ensp
- public class&e
- The 8859-1Q
- 建立Sochet类的服务器端需要哪些步骤
- Java中的时间利用时间处理类进行处理。
- Given: int[]&
- 20. public&ens
- } What is
- 下面有关java内存模型的描述,说法错误
- A developer&en
- In form-based&
- java中,用()关键字定义常量。
- public class&e
- 一个偶数总能表示为两个素数之和。
- 下列关于JDK、JRE和JVM的描述。哪
- Applet的布局设置默认是FlowLa
- 1. public&ensp
- 现有: 1. &