Can somebody please explain the reasoning behind Java’s semantics for equals when applied to Integer and Long?
Seriously, why does Integer.valueOf(1).equals(Long.valueOf(1)) return false?
When is this a useful semantics?
Can somebody please explain the reasoning behind Java’s semantics for equals when applied to Integer and Long?
Seriously, why does Integer.valueOf(1).equals(Long.valueOf(1)) return false?
When is this a useful semantics?
Trackbacks & Pingbacks 1
[...] Approximately 40min into podcast #034 the Java Posse address my question about equals() between Java Long and Int objects. [...]
Post a Comment
You must be logged in to post a comment.