isEmpty()方法源码
isBlank()方法源码
测试
import org.apache.commons.lang3.StringUtils; public class main { public static void main(String[] args) { System.out.println(StringUtils.isEmpty(" ")); //false System.out.println(StringUtils.isBlank(" ")); //true } }