Comparing Strings


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Comparing Strings

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Location
    Chicago
    Posts
    108

    Angry Comparing Strings

    I am trying to compare user input to variables that i have defined.
    I want jave to ignore the cases when the strings are compared. Does anybody have any suggestions/hints?

  2. #2
    Join Date
    Oct 2004
    Posts
    2

    equalsIgnoreCase

    You can use "equalsIgnoreCase(String anotherString)" method of Strings class. It works just like equals method except, it makes case-insensitive comparisons. Please post a reply saying whether this solved ur problem or not.
    If u have a difficult task on hand, give it to a lazy person. They'll find an easier way to do it!!

  3. #3
    Join Date
    Oct 2004
    Location
    Chicago
    Posts
    108

    Thumbs up

    Yes this is what i needed thank you very much.

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