首页 > 试题广场 >

执行以下程序后,输出结果正确的是?()publicclass

[单选题]

执行以下程序后,输出结果正确的是?()

public class Main {

    public static void main(String[] args) {

        String s1 = "abc";

        String s2 = "abc";

        System.out.println(s1 == s2);

        String s3 = new String("abc");

        System.out.println(s1 == s3);

    }

}

  • true true

  • true false

  • false fasle

  • false true

这道题你会答吗?花几分钟告诉大家答案吧!