• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Beginnerquestion about if (personName==null || personName.equals(""))
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Beginnerquestion about if (personName==null || personName.equals(""))


  • Subject: Re: Beginnerquestion about if (personName==null || personName.equals(""))
  • From: Art Isbell <email@hidden>
  • Date: Thu, 6 Sep 2007 23:59:36 -1000

On Sep 6, 2007, at 11:44 PM, Rainer User wrote:

Why i have to use personName.equals("")   +and+    personName==null to detect if personName is empty or not?

personName could have a null value or it could be a non-null String object whose value is the empty string.  Both situations indicate a personName with no value, so both conditions need to be tested.

Aloha,
Art

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Beginnerquestion about if (personName==null || personName.equals("")) (From: Rainer User <email@hidden>)

  • Prev by Date: Beginnerquestion about if (personName==null || personName.equals(""))
  • Next by Date: TextExpander
  • Previous by thread: Beginnerquestion about if (personName==null || personName.equals(""))
  • Next by thread: Re: Beginnerquestion about if (personName==null || personName.equals(""))
  • Index(es):
    • Date
    • Thread