Scala provides method overloading feature which allows to define methods.
Run the following command where the two add methods are defined with different number of parameters but they have same data type:
OUTPUT:
Scala provides method overloading feature which allows to define methods.
Run the following command where the two add methods are defined with different number of parameters but they have same data type:
OUTPUT: