3 ms·
Why do NET strings override == and Java strings don't?
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?
- datalist 10y agoJava 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).