Studying for SCJP 6
Originally posted by Campbell Ritchie:
Overloaded as in ++n and n++?
Yes, what a silly mistake for me to make![]()
Originally posted by Campbell Ritchie:
Is the ++ operator really overloaded? I don't think it is; the only overloaded operators I can think of are + after a String and maybe &^| for logical and bitwise operations.
(...)
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupery
Originally posted by Anand Hariharan:
I doubt if the unary AND, OR and XOR operations could be considered as "overloaded". Aren't they operations on fundamental types? Besides, what other semantics do they have besides those bit-wise operations?
- Anand
Originally posted by Keith Lynn:
They can be used with boolean operands. The difference between them and the && and || is that && and || are short-circuit operators.
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupery
"I'm not back." - Bill Harding, Twister
Curse your sudden but inevitable betrayal! And this tiny ad too!
Master Gardener Program
https://coderanch.com/t/771761/Master-Gardener-Program
|