Interview Question
Qus: Difference between a.equals(b) and a==b?
== checks if both objects point to the same memory location whereas equals() evaluates to the comparison of values in the objects.
Answers (2)
== checks if both objects point to the same memory location whereas equals() evaluates to the comparison of values in the objects.