Why do NET strings override == and Java strings don't?

2 points by sqldba ↗ HN
This is regarding using .equals() in Java so as not to compare object references.

I just wonder why it was done that way. Did Java just not think about it until it was too late to change, or, was there some technical reason?

1 comment

[ 2.8 ms ] story [ 24.3 ms ] thread
Java does not have operator overloading. That choice was made IIRC for simplicity reasons. The same why they did not implement multiple inheritance (which they started doing with Java 1.8 and default methods in interfaces).