试题详情
- 单项选择题 public class X { public static void main (String[]args) { string s = new string (“Hello”); modify(s); System.out.printIn(s); } public static void modify (String s) { s += “world!”; } } What is the result?()
A、 The program runs and prints “Hello”
B、 An error causes compilation to fail.
C、 The program runs and prints “Hello world!”
D、 The program runs but aborts with an exception.
- A
关注下方微信公众号,在线模考后查看
热门试题
- What is th
- 线程安全的map在JDK 1.5及其更高
- 面板必须有一个布局管理器,不能出现没有布
- Which the two&
- Which EL
- What OrderSErvl
- Whichtwo scena
- Which interfac
- int x =&e
- 编写一个Java程序在屏幕上输出1!+2
- A Company.com&
- byte arry1,&en
- Given the&ensp
- You are b
- 一个素数称之为超级素数,若该素数依次去掉
- 内部框架用于在主框架内部显示一系列子框架
- 如果类中的成员只能被子类或同一包中的类访
- 在Java中,关于HashMap类的描述
- 如果a,b是引用类型的变量,且赋值表达式
- 以下异常中,不属于Runtimeexce