educative.io

Method overloading

Hi,
I’m not sure where the method overloading is happening. There’s only one “demo” method.


Type your question above this line.

Course: https://www.educative.io/collection/10370001/6201068373409792
Lesson: https://www.educative.io/collection/page/10370001/6201068373409792/6265394450923520

@Gayoung_Han

Method overloading is happening at the function call. Every time we call the function demo, we pass different number of arguments and this is called method overloading. Either we can have same function name with different number of parameters or the case we have where we’re calling a function multiple number of times with different numbers of parameters.

If you still face any confusion, feel free to ask :slight_smile:

1 Like