What is the difference between `==` and `.equals()` in Java?
`==` is for checking object references, and `.equals()` is for checking object equality based on their content. For example, comparing two strings.
You're on the right track, but your explanation about string comparison is a bit too narrow. It's not just strings that require `.equals()`.
Could you clarify how `.equals()` works when used with custom objects, and why itâ€™s important to override it?