dimanche 5 décembre 2021

Should i use .equals or == [duplicate]

I've been wondering. I've heard from some developers that there's a difference between .equals() and ==. But I know it's quite the same. Should I use .equals or == when checking something? I usually use ==, It's not quite comfortable to use .equals() and that's why i'm asking this, People say that there are conditions that I should use .equals and condition I should use ==. Please help me answer this.

Aucun commentaire:

Enregistrer un commentaire