aspose file tools*
The moose likes Beginning Java and the fly likes Comparing Strings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Comparing Strings" Watch "Comparing Strings" New topic
Author

Comparing Strings

Daniel Roman
Greenhorn

Joined: Jan 24, 2004
Posts: 4
I want to write a method that should return true if it refers to a String object that is the same . Otherwise, the method should return false.
Any suggestions ??
Vicken Karaoghlanian
Ranch Hand

Joined: Jul 21, 2003
Posts: 522

if you want to compare regardless to the string case (upper or lower) then use s1.equalsIgnoreCase(s2)


- Do not try and bend the spoon. That's impossible. Instead, only try to realize the truth. <br />- What truth? <br />- That there is no spoon!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Comparing Strings
 
Similar Threads
Exceptions...
Overriding
Knowing Client machine IP address through servlets
Quick Question
handling "table not found" !!!!!