Submitted by Tim (not verified) on July 30, 2010 - 10:11pm
"However, unlike C++, Java does not let us overload operators like the "==" operator. The designers of the Java language intentionally made this design decision to simplify the Java language."
I don't think this is correct. Java does not allow *users* to overload operators. A programmer cannot define new methods for applying ">" or "==" to non-numeric objects. However, the Java language does overload its own operators. For example, the "+" operator may be used either for adding integers or concatenating strings. Why the language designers chose not to overload "==" the way they did "+" remains a mystery (to me, anyway).
operator overloading
"However, unlike C++, Java does not let us overload operators like the "==" operator. The designers of the Java language intentionally made this design decision to simplify the Java language."
I don't think this is correct. Java does not allow *users* to overload operators. A programmer cannot define new methods for applying ">" or "==" to non-numeric objects. However, the Java language does overload its own operators. For example, the "+" operator may be used either for adding integers or concatenating strings. Why the language designers chose not to overload "==" the way they did "+" remains a mystery (to me, anyway).