![图片[1]-java中空串是什么-uusu优素-乐高,模型,3d打印,编程](https://uusu.cn/wp-content/uploads/2025/01/1634609445457607.png)
1、空串 "" 是长度为0的字符串。
2、空串是一个Java对象,有自己的串长度(0)和内容(空)。String变量还可以存一个特殊的值,名为 null ,表示目前没有任何对象与该变量关联。
实例
Stringstr=“\r\n\t”;
System.out.println(str+“"+StringUtils.isBlank(str));
str.replace("\r",“”);
str.replace("\t",“”);
str.replace("\n",“”);
System.out.println(str+"”+StringUtils.isBlank(str));原文来自:https://www.py.cn © 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END

















































暂无评论内容