设有字符串变量String s1="abc", s2=new String("abc"),则以下表达式的值为true的是( )
A.s1.compareToIgnoreCase(s2) B.s1.compareTo(s2) C.s1==s2 D.s1.equals(s2)正确答案D
设有字符串变量String s1="abc", s2=new String("abc"),则以下表达式的值为true的是( )
A.s1.compareToIgnoreCase(s2) B.s1.compareTo(s2) C.s1==s2 D.s1.equals(s2)正确答案D