Overloading is a way of using the same method name for


There are numerous ways to test for equality Works fine for primitive types, but not for objects such as strings, etc. Why is this so? Discuss why doesn't work when utilizing Strings but does for integers and doubles.

Overloading is a way of using the same method name for multiple methods as long as the number / types of arguments are different. Why is overloading useful? Give an example (other than the one in the lecture notes or book) of how this could be used.

Solution Preview :

Prepared by a verified Expert
Programming Languages: Overloading is a way of using the same method name for
Reference No:- TGS01285984

Now Priced at $45 (50% Discount)

Recommended (92%)

Rated (4.4/5)