Method one:
if(StringUtils.isNotBlank(str))//判断字符串不为空 或if(StringUtils.isBlank(str))//判断字符串为空
Method two:
if(s == null ||"".equals(s));
Method three: Compare string length
if(s == null || s.length() <= 0);
Method Four:
if(s == null || s.isEmpty());
Method five:
if (s == null || s == "");
Recommended tutorial: java quick start
The above is the detailed content of What are the methods to determine whether a string is empty in java. For more information, please follow other related articles on the PHP Chinese website!