What is the difference between these two methods?
public boolean nameControl(String str)
{
if (str.trim().isEmpty()) return false;
if (str.trim().length() == 0) return false;
return true;
}
I need find out that str
should have at least one character.