Chapter 22. Operator overloading

Operator overloading is a feature of C++, which has (unfortunately or fortunately [1]) been removed from Java. What you can do with operator overloading can be performed with common methods – in fact you define an operator overload using a method itself. Hence, I will not classify operator overloading as an important or essential feature of C#, but rather one which gives good developers more choice and flexibility.

[1] It is unfortunate because operator overloading is a convenient feature which makes programming more elegant. It is fortunate because since it is not an important feature – you can duplicate operator overloading functionality using normal methods – not including it in Java makes it an easier language to learn.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.4.234