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

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

[复制链接]

382

主题

56

回帖

2185

积分

管理员

积分
2185
发表于 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, 2025-4-12 00:02 , Processed in 0.884957 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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