Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Comparing Strings

 
Daniel Roman
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 522
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

if you want to compare regardless to the string case (upper or lower) then use s1.equalsIgnoreCase(s2)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic