找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 127|回复: 0

两个为null的字符串啊相加是nullnull

[复制链接]

373

主题

55

回帖

1944

积分

管理员

积分
1944
发表于 2023-2-27 23:29:47 | 显示全部楼层 |阅读模式
两个为null的字符串啊相加是nullnull


public class TestDemo {
    public static void main(String[] args) {
        String a  = null;
        String b = null;
        System.out.println(a + b);
    }
}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Comsenz Inc.

GMT+8, 2024-9-20 09:43 , Processed in 0.029367 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表