Operator overloading is where the functionality of an operator can be redefined. In Java, for example, the "+" operator means addition when used with two numeric primitive operands, but means String concatination when either or both the operands are String objects.
Unlike some other languages, such as C++, Java does not allow programmer-defined operator overloading. For Java programmers, this means that when you see an operator, its definition is in accordance with the language specification and has not been arbitrarily redefined by the programmer that authored the code, i.e. "no surprises".
2006-11-13 13:03:09
·
answer #2
·
answered by vincentgl 5
·
0⤊
0⤋