Introduction to OOP | Chapter 15: Overloading : | next | previous | audio | real | text |
class Example { // same name, three different methods int sum (int a) { return a; } int sum (int a, int b) { return a + b; } int sum (int a, int b, int c) { return a + b + c; } }A type signature is the combination of argument types and return type. By looking at the signature of a call, can tell which version is intended.