5.user Defined Methods 2024 25
5.user Defined Methods 2024 25
Pure method /Accessor: Method which does not change the state of the
object .
Impure methods/Mutator: Method which changes the state of the object .
Function Overloading
int area(int l,int b)
int area(int s)
double area(double r)
Methods having the same names but difference in number
of parameters or data types of the parameters are called
over loaded methods.
We cannot judge overloaded methods or not based on
return types of methods/functions.