Why operator overloading is not allowed in java




















The design of java would have more complex by adding Operator overloading than without it, and it causes slowness in JVM or might have lead to a more complex compiler. Supporting operator overloading is more difficult, and if the same thing can be achieved in java, by using method overloading in a more intuitive and cleaner way, then it does make sense to not support operator overloading, from JVM perspective. Avoiding operator overloading has made java language easier to handle and process, which in turn makes it easier to develop the tools, that process the language e.

IDE or re-factoring tool, which is an additional advantage of not supporting operator overloading in Java. Programmers can use method overloading in java instead of operator overloading to achieve the goal in a simple, error-free, and clear manner. Your email address will not be published.

Save my name, email, and website in this browser for the next time I comment. Home Contact About Advertise. Neeraj Mishra Interview Questions Leave a comment.

Why No Operator Overloading? You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.

Performance Performance. These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.

Targeting Targeting. These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device.

If you do not allow these cookies, you will experience less targeted advertising. Turnkey appliance of platform and hardware. Moreover, while working with programming languages that support operator overloading the program error rate is high compared to others.

Your comment on this answer: Your name to display optional : Email me at this address if a comment is added after mine: Email me if a comment is added after mine Privacy: Your email address will only be used for sending these notifications. Related Questions In Java. Does Java support Default Parameters? Does the finally block always execute in Java? What does Java option -Xmx stand for?

How to execute a python file with few arguments in java? What does NaN mean in Java? Can quotes be added in a java string. Welcome back to the World's most active Tech Community! Password must have. Please enter a valid emailid. Forgot Password? Subscribe to our Newsletter, and get personalized recommendations.



0コメント

  • 1000 / 1000