DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Thread: "".equals()

Hybrid View

  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
    >
    >
    >



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links