31

判空我推荐StringUtils.isBlank-Java旅途的博客

 4 years ago
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.
neoserver,ios ssh client
在我们日常开发中,判空应该是最常用的一个操作了。因此项目中总是少不了依赖commons-lang3包。这个包为我们提供了两个判空的方法,分别是StringUtils.isEmpty(CharSequencecs)和StringUtils.isBlank(CharSequencecs)。我们分别来看看这两个方法有什么区别。一、StringUtils.isEmptyisEmpty的源码如下:publi

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK