Is there a different logic in Java for if statements when it comes to conditions? I mean my attempt to compare a String variable and a String attribute of a class that is on an array of objects was frustrated someway. It will not enter the if block. The two strings are equal. I displayed the values of each strings before the if evaluation and they are equal. The simbol I used was the ==, and I also tried the string.equals(string variable) as well as the
compareTo() == 0 option but none of those worked. I wish I knew what it is the way to compare two strings. Any advice will be appreciated. Thank you.