试题详情
- 单项选择题 public class foo { public static void main (String[]args) { 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
关注下方微信公众号,在线模考后查看
热门试题
- What is th
- 以下哪个组件中不能使用HTML标记?()
- 类Account中字段声明正确的是?()
- 以下哪些包是Java标准库中常用的包?(
- 1. class
- abstract class
- 有关hashMap跟hashTable的
- 为了实现自定义对象的序列化,该自定义对象
- 表达式-0.0==0.0的结果为true
- public class&e
- java中HashTable,Vecto
- 由A地到B地,中间有一段扶梯,总路程和扶
- Panel与Applet有何关系?Pan
- Which statemen
- 已知: 则下面哪个表达式在横线处是正确
- 输入一行字符,分别统计出其中英文字母、空
- 1. class
- switch (i)&ens
- A Company.com&
- Which statement