WHY ISN’T THERE OPERATOR OVERLOADING?

Awadhendra Tiwari

Total Post:510

Points:2550
Posted by  Awadhendra Tiwari
Java 
 1344  View(s)
Ratings:
Rate this:
  1. Awadhendra Tiwari

    Post:510

    Points:2550
    Why isn’t there operator overloading?

    Because C++ has proven by example that operator overloading makes code almost impossible to maintain. In fact there very nearly wasn’t even method overloading in Java, but it was thought that this was too useful for some very basic methods like print(). Note that some of the classes like DataOutputStream have unoverloaded methods like writeInt() and writeByte().

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!