How can I check whether a string is not null and not empty?
public void doStuff(String str) { if (str != null && str != \"**here I want to check
Use Apache StringUtils' isNotBlank method like
StringUtils.isNotBlank(str)
It will return true only if the str is not null and is not empty.