Basically == tests to see if two references point to the same object on the heap, and .equals tests object equality either, by default (see for instance strings) or by your own implementation (ie. by overriding the .equals method).
However, take note you will have to read more about bothe equals and Strings, as strings have a partiular behaviour with equals and ==, especially when it comes to the
String pool.