如何检查字符串是否为空且不为空?
public void doStuff(String str) { if (str != null && str != "**here I want to check the 'str' is empty or not**") { /* handle empty string */ } /* ... */ }
java string string-comparison
java ×1
string ×1
string-comparison ×1