==checks whether two variables store the same primitive value or point to the exact same object in memory..equals()checks whether two objects contain the same data.
Loading…
== checks whether two variables store the same primitive value or point to the exact same object in memory.
.equals() checks whether two objects contain the same data.