CodePhataa
Home
GoAlgo
Revision Hub
Learning Path
Challenge
Compiler
More
Toggle theme
Open menu
Equals, hashCode, and Immutability | Java Quiz | CodePhataa | CodePhataa
Equals, hashCode, and Immutability
Back
1 / 25
0 pts
Contract
If a.equals(b) then a.hashCode() == b.hashCode() is:
A
Optional for performance
B
Required by the Object contract
C
True only for Strings
D
Enforced by the compiler
Select an answer to continue.