高等继续教育 / Java程序设计
题型描述: 纠错题
请给出以下程序的输出结果。
class StringTest1
{
public static void main(String[] args)
{
String s1=hello;
String s2=new String(hello);
if(s1.equals(s2)){
System.out.println(相等);
}else{
System.out.println(不相等);
}
}
}
请给出以下程序的输出结果。
class StringTest1
{
public static void main(String[] args)
{
String s1=hello;
String s2=new String(hello);
if(s1.equals(s2)){
System.out.println(相等);
}else{
System.out.println(不相等);
}
}
}
参考答案:
佳题速递: