A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 18001105207 中级黑马   /  2016-9-23 12:17  /  568 人查看  /  5 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

大家说说下面程序的结果
package demo01;

public class Demo01 {

        public static void main(String[] args) {

                String s1 = "hello";
                String s2 = "world";
                String s3 = s1+s2;
                String s4 = "hello"+"world";
               
                System.out.println(s4 == s3);
                System.out.println(s4.equals(s3));
        }

}

5 个回复

倒序浏览
False
True
回复 使用道具 举报
false  true
回复 使用道具 举报
false true
回复 使用道具 举报
你们都好厉害
回复 使用道具 举报
ddddddddddddd
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马