Is it possible to overload operators in Java?
Explanation
It is not allowed by language design. Java is designed to be maximally readable and explicit.

Operator overloading isn't possible because Gosling said so. No other reason, it's his PERSONAL CHOICE. So yes, Java users, we have to suffer without them because some guy said so.

2023 Feb 17, 10:42:50 AM

"+" is overloaded. It is responsible for string concatenation and arithmetic addition.

2015 Nov 28, 11:31:21 AM

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з Java
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести