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

Help regarding comparison of a string value with a String stored in database

 
shobha devi
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a table in oracle that contains a string. I retrieve the value and store it in a string variable. Now when i compare the retrieved value with another string using ".equalsIgnoreCase" the result returned is always false.

Can anybody suggest a method to accomplish my requirement
 
Rajkamal Pillai
Ranch Hand
Posts: 445
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello,

I assume that you must have verified that both the String being compared are the same. You might just want to do a .trim() on the objects to remove any leading or trailing whitespace from them before you do an equals() nor an equalsIgnoreCase().

Cheers,
Raj.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic