Home > Blockchain >  Java - comparing string always false
Java - comparing string always false

Time:03-06

I have two string when I compare them - I always have them as if they are not equal

One of strings is from Firebase Real-Time Database

How to solve this problem?

Strings:

In code:

strings

In console:

strings

Result:

Code:

result

Console:

result

CodePudding user response:

I think this link will help you. Probably using .strip() will solve your issue. Some characters of the string are not "visible" to the human eye/print.

  • Related