Welcome to Questionaries, where you can ask questions and receive answers from other members of the community.

Let us know at info@questionaries.org

Why isn't there operator overloading?

4 like 0 dislike
Hello
Why isn't there operator overloading Java?
please reply me. i am waiting for your reply.
Thanx
asked 1 year ago by DBA-boss (120,990 points)

1 Answer

2 like 0 dislike
 
Best answer
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().
answered 1 year ago by eagles11 (179,830 points)

Related questions

9 like 0 dislike
1 answer
11 like 0 dislike
0 answers
4 like 0 dislike
1 answer
asked 1 year ago by DBA-boss (120,990 points)
4 like 0 dislike
1 answer
12 like 0 dislike
2 answers