---
title: "Why isn’t there operator overloading?"  
description: "Why isn’t there operator overloading?"  
author: "Anonymous User"  
published: 2011-05-21  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/989/why-isn-t-there-operator-overloading  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# 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().

## Answers

### Answer by Anonymous User

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().


---

Original Source: https://www.mindstick.com/interview/989/why-isn-t-there-operator-overloading

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
