Frage im Vorstellungsgespräch bei EPAM Systems

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

Antworten zu Vorstellungsgespräch

Anonym

29. Jan. 2020

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

Anonym

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