Question d’entretien chez EPAM Systems

What is the difference between == vs equals() in Java?

Réponses aux questions d'entretien

Utilisateur anonyme

29 janv. 2020

== compares the memory location or the address comparison where as .eaquals compares values or content.

Utilisateur anonyme

7 mai 2017

== is a reference comparison, i.e. both objects point to the same memory location. .equals() evaluates to the comparison of values in the objects

1