• 2022-06-07
    下面代码执行结果是()。publicclassTest{publicstaticvoidmain(Stringargs[]){Strings1=newString("BestJava");Strings2=newString("BestJava");if(s1==s2)System.out.println("s1==s2");if(s1.equals(s2))System.out.println("s1.equals(s2)");}}
    A: s1.equals(s2)
    B: s1==s2
    C: 其他
    D: s1==s2s1.equals(s2)