Before you get the usual " do not use String ".
You need to use String function / method to compare them, not just "==" or "!=" .
Then evaluate the return values > < when not compared - and when compared returns zero.
if( ! String method to compare stings )
= 0 they match
< > they do not match