单项选择题
下面的哪些程序段可能导致错误 ( )
Ⅰ:String s="Gone with the wind";
String t="good";
String k=s+t;
Ⅱ:String s="Gone with the wind";
String t;
t=s[3]+"one";
Ⅲ:String s="Gone with the wind";
String standard=s.toUpperCase();
Ⅳ:String s="home directory";
String t=s-"directory";
A.Ⅱ、Ⅲ
B.Ⅱ、Ⅳ
C.Ⅰ、Ⅳ
D.Ⅲ、Ⅳ
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
在JavaApplet程序用户自定义的Applet子类中,一般需要重载父类的( )方法宋完成主类实例的初始化工作。
A.start()
B.stop()
C.init()
D.paint()
点击查看答案&解析
单项选择题
方法resume()负责恢复哪些线程的执行( )。
A.通过调用stop()方法而停止的线程
B.通过调用sleep()方法而停止运行的线程
C.通过调用wait()方法而停止运行的线程
D.通过调用suspend()方法而停止运行的线程
点击查看答案&解析
相关试题
设有如下程序: import java.util.*;...
下面程序的输出结果是( )。 public cl...