EPAM Systems interview question

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

Interview Answers

Anonymous

Jan 29, 2020

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

Anonymous

May 7, 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