+ 1
In which scenario we use method overloading.? Or what is the use of this provision in programming?
1 Réponse
+ 1
you can use method overloading if you need two or more method from one class with the same name. example
public int add(int a)
public int add(int a, int b)
so if you want to call this method you can do like this
add(5)
or
add(5,8)