Explain the differences between == and .equals() in Java. When would you override .equals() and hashCode()?

Technical