Hi Folks, i am new at the webobjects-dev maillist and new to webobjects too.
I am reading the white printed book "Webobjects 5, Web Applications", from Apple, it was included in the Webobjects Package of my Webobject-Box.
On Page 84 i found an example where a funktion trys to detect if a variable named "personName" [type of it is "String"] is empty or not.
The substantial Code says:
if (personName==null || personName.equals("")) { return(true); } else { return(false); }
In my opinion it would be the same if i write only:
if (personName==null) { return(true); } else { return(false); }
Where is my misunderstanding? Why i have to use personName.equals("") +and+ personName==null to detect if personName is empty or not?
Maybe someone can help me ore give me a hint?
Thanks from Germany,
Thomas
|