单项选择题
下列代码段的执行结果是( )。
public class Test
public static void main(String args[ ])
String s1= new String("hello");
String s2= new String("hello");
System.out.println(s1==s2);
System.out.println(s1.equal(s2));
A.true false
B.true true
C.false true
D.false false
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
问答题
下面的代码实现一个简单的Applet: import java.applet.Applet; import java.awt.*; public class Sample extends Applet private String text= Hello World ; public void init() add(new Label(text)); public Sample (String string) text=string; 通过下面的HTML文件访问: <html> <title>Sample Applet< title> <body> <applet code= Sample.class width=200 height=200>< applet> < body> < html> 当编译和运行该小程序时会出现什么结果,请选择正确的答案。( )
点击查看答案&解析
填空题
算法的时间复杂度是指 【1】 。
点击查看答案&解析
相关试题
每个Applet必须定义为 【13】 的子类。
阅读下面程序段,SelectItem应用程序显示从...
下列Applet在窗口中实现一个不可编辑的Text...
Java源程序是由类定义组成的,每个程序中可...
【11】 是Swing新增加的组件,主要功能...