You need to create a method that can be called by using a varying number of parameters.
What should you use?
A.
Method overloading
B.
Interface
C.
Named parameters
D.
Lambda expressions
Explanation:
Member overloading means creating two or more members on the same type that differ only in the number or
type of parameters but have the same name.
Overloading is one of the most important techniques for improving usability, productivity, and readability of
reusable libraries. Overloading on the number of parameters makes it possible to provide simpler versions of
constructors and methods. Overloading on the parameter type makes it possible to use the same member
name for members performing identical operations on a selected set of different types.
C – single method that can be called with different number of params
Its A, method overloading allow different ammount of parameters and type, named parameternonly defines the name of the parameter.