Question d’entretien chez Backstop Solutions

What is the difference between .equals and ==?

Réponse à la question d'entretien

Utilisateur anonyme

16 janv. 2011

In the case of objects, == looks at memory address, and .equals looks at the .equals method on the object (which should look at the content). For primitives, == will look at the content.