SyntaxFix
Write A Post
Hire A Developer
Questions
No, the String.isEmpty() method looks as following:
String.isEmpty()
public boolean isEmpty() { return this.value.length == 0; }
as you can see it checks the length of the string so you definitely have to check if the string is null before.