I read that
usually we use equals() for comparing immutable object, where == is used for mutable object
I know the differences between equals and "==", but why it is preferred to use equals for immutable objects? and why using "==" for mutable objects? since in my logic when I want to compare two objects (compare state, not identity) so why it is not recommended to use equals()?