I'm currently studying the java.time API and I have encountered the following phrase on Java LocalDateTime Documentation
This is a value-based class; use of identity-sensitive operations (including reference equality (==), identity hash code, or synchronization) on instances of LocalDateTime may have unpredictable results and should be avoided. The equals method should be used for comparisons.
So, I was just wondering, why it is not recommended to use identity-sensitive operations (including reference equality (==), identity hash code, or synchronization) on instances of LocalDateTime?