Why Java Does Not Support Operator Overloading ?

Java supports Method overloading but does not support operator overloading. It would make the design more complex by adding operator loading. Also it will make more complex compiler.

One more reason is that, it will reduce the performance of JVM by operator overloading, since JCM has to do extra work to find the real meaning of overloaded operators at run time.



You May Interest

How Will You Define the Scope of a Bean in Spring ?

Why an Object Used as Key in HashMap Should Be Immutable in Java ...

How Will You Pass Information From One JSP to Another JSP ?

How Will You Use Other Java Files of Your Application in JSP Code ...

What is the Difference Between Sleep and Wait Methods in Java ?