in function overloading is it required that all data types have to be different? for e.g.:
public void area( int a int b int c)
public void area( double a double b double c)
so do all have to be double or only one double will do?
Answers
Answered by
1
In function overloading rule is same method name and different input and output parameters.
so as you can have all double is acceptable and also you can have one double with others two parameters int will be applicable.
Similar questions
Math,
7 months ago
Math,
7 months ago
Biology,
1 year ago
Psychology,
1 year ago
Chemistry,
1 year ago