0
Why does Java not support operator overloading ?
3 Antworten
+ 3
Java only allows arithmetic operations on elementary numeric types. It's a mixed blessing, because although it's convenient to define operators on other types (like complex numbers, vectors etc), there are always implementation-dependent idiosyncrasies. So operators don't always do what you expect them to do. By avoiding operator overloading, it's more transparent which function is called when. A wise design move in some people's eyes.
0
ask from creator of java.
use kotlin it support operator overloading
0
That's not an answer