What is the difference between == and .equals() in Java when comparing objects?
== compares the memory addresses of the objects, while .equals() compares their contents.
== compares the contents of the objects, while .equals() compares their memory addresses.
Both == and .equals() compare the memory addresses of the objects.
They are the same