【问题】 下列程序的输出结果_______。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("不相等");}}}
正确答案:正确答案为: 相等
题目解析:本题出自石家庄铁道大学,石家庄铁道大学面向对象程序设计,由丰阳塔题库搜集整理。