Originally posted by victor kamat:
Is "+" the only overloaded operator in Java or are there any others.
The short answer is that "+" is the only overloaded operator.
But note that |, &, and ^ can be applied to either numeric operands (where they act as bitwise operators) or to boolean operands (where they act as logical operators).
I don't regard this as overloading, because these logical operations are really the same as bitwise operations applied to a single bit (true or false). But since the bit format of a Java boolean is not specified, I suppose one could argue that it is a form of overloading.
[ August 07, 2007: Message edited by: marc weber ]