"".equals()


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: "".equals()

  1. #1
    Mark Guest

    "".equals()


    This is related to my previous posting but it is also a separate question.
    What does the "" refer to in the sytax "".equals()? I know we have the
    import keyword, but doesn't .equals belong to a couple of different classes?
    How do you know which one it is referencing? Is the answer - by what it
    is processing? If so, then why do you need the "" in front of it? The syntax
    seems criptic. Any clues or am I way off base here?

    Thanks again for your help!

    Mark




  2. #2
    Tom Duffy Guest

    Re: "".equals()


    Hello Mark:

    It looks like you are comparing some String object to an empty String. In
    English: If the String argument passed to the equals() method is empty,
    then the method returns true - if not, equals() returns false.

    HTH,

    Tom Duffy

    "Mark" <msorteberg@inspec.com> wrote:
    >
    >This is related to my previous posting but it is also a separate question.
    > What does the "" refer to in the sytax "".equals()? I know we have the
    >import keyword, but doesn't .equals belong to a couple of different classes?
    > How do you know which one it is referencing? Is the answer - by what it
    >is processing? If so, then why do you need the "" in front of it? The

    syntax
    >seems criptic. Any clues or am I way off base here?
    >
    >Thanks again for your help!
    >
    >Mark
    >
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center