2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Ezzaral
Featured Replies
  • 1
    Ezzaral 2,714   9 Years Ago

    [quote=venomlash;447583]Okay, [inlinecode]num_reasons_why_cpp_better_than_JAVA++;[/inlinecode] thanks anyway, Ezzaral.[/quote] Well, you are welcome to that opinion of course, but operator overloading isn't really all that special and probably causes more confusion than it's worth. It's syntactic sugar and might save you a couple characters typing, but you can achieve the exact same functionality with … Read More

0

No, operator overloading is not possible in Java. The only thing you can do is add methods for the operations you need.

1

Okay, num_reasons_why_cpp_better_than_JAVA++; thanks anyway, Ezzaral.

Well, you are welcome to that opinion of course, but operator overloading isn't really all that special and probably causes more confusion than it's worth. It's syntactic sugar and might save you a couple characters typing, but you can achieve the exact same functionality with methods that perform the operations and no one has to wonder what "+" or "-" does in a given context.

Votes + Comments
excellent point
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.