Analyzing the string is not empty

private Boolean hasLength(String str)
{
return str != null && !"".equals(str.trim());
}

Guess you like

Origin www.cnblogs.com/Sly-Mi/p/11183034.html