What is the difference between '==' and '.equals()' in Java?
'==' compares if two objects have the same values, but '.equals()' compares if they are the same object.
That's a bit mixed up. '==' compares object references, while '.equals()' compares the actual values of the objects.
Can you explain what happens when you use '==' to compare two string objects in Java?