31
判空我推荐StringUtils.isBlank-Java旅途的博客
source link: https://blog.51cto.com/14820531/2496583
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
在我们日常开发中,判空应该是最常用的一个操作了。因此项目中总是少不了依赖commons-lang3包。这个包为我们提供了两个判空的方法,分别是StringUtils.isEmpty(CharSequencecs)和StringUtils.isBlank(CharSequencecs)。我们分别来看看这两个方法有什么区别。一、StringUtils.isEmptyisEmpty的源码如下:publi
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK