answersLogoWhite

0

Why java not support oprator overloading?

Updated: 8/20/2019
User Avatar

Wiki User

11y ago

Best Answer

Pressumably, the designers of Java thought this would lead to confusing code.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why java not support oprator overloading?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Operator overloading is possible in java or not?

Java does not support opperator overloading, so the answer to your question is: none.


What is a operator overriding in java?

Java does not support object overriding. It does support operator overloading by means of the "+" symbol which is used for both numeric addition as well as string concatenation.


What are the restriction that are applied to operator overloading?

Java does not support user defined operator overloading.The operator '+' is overloaded in Java and can be used for adding both numbers and Strings.


Why operator overloading is not there in java?

== == === === === === === === Some Body told me that operator overloading is not there because it violates the transparency of java.since there is no hiding of information in java it does support op overloading === === === === === === Pranab Kumar Rana Software Engineer..... === === === ===


Why java not support operator overloading?

Maybe because Sun said so. We have to bear with so many other idiosyncrasies too. But I guess that comes with every language. There were two major reasons why operator overloading wasn't allowed in Java: "cleanliness" and compiler complexity. The main reason was the first, a personal preference choice made by Java's creator, James Gosling. Operator overloading, while useful, can be exceedingly confusing, much more so than method overloading. Given the human tendency to assign specific meanings to single symbols, it is hard to get programmers to wrap their heads around multiple meanings for operators. What this means is that there is a marked increase in programming errors when a language supports operator overloading. Since practically the same benefit can be obtained via methods, the Java designers decided that the increased programmer mistake rate was not worth supporting operator overloading. From a Java compiler (e.g. javac) design standpoint, supporting operator overloading is considerably more difficult than method overloading, requiring a more complex compiler.


How many constructor can be defined in a classin java p rogramming?

how many constructer can be defined in class in overloading of java programming


What does java not support?

Java does not support multiple inheritance.......


Does a DSI have java?

No it does not support Java


Does java support call by reference?

No , Java does not support call by reference.


Does Java support copy constructor?

No. Java does not support copy constructor


What is operator overloading?

I think you mean operation overlord??? It is the American, Canadian and British offensive on Europe in World War 2. They landed in Normandy on 6th June 1944 (Commonly called D-Day, Day of Days or Deliverance Day) and progressed throughout France liberating Paris on the 25th August. This allowed the allies a foothold in Europe.


How does java support the concept of destructer in java?

In Java, Java does support the concept of destructor, it's done via special method finalize.