1、方法使用
优先使用String类本身及工具包StringUtils、StrUtil中的方法
例如:
String.valueOf(4);
StringUtils.trimWhitespace(item);
StrUtil.isBlank(item);
2、常量使用
优先使用工具包StringUtils、StrUtil中的常量
例如:
StringUtils.EMPTY;
StrUtil.NULL;
优先使用String类本身及工具包StringUtils、StrUtil中的方法
例如:
String.valueOf(4);
StringUtils.trimWhitespace(item);
StrUtil.isBlank(item);
优先使用工具包StringUtils、StrUtil中的常量
例如:
StringUtils.EMPTY;
StrUtil.NULL;