consider a class that has a method, divide, which takes the input parameter as integer data
types only. How many parameters can on overloadefunction have if there is a predefined
method with three parameters?
Answers
Answered by
6
Answer:
4 overloaded functions can be formed if they are receiving same type of parameters.
Explanation:
void divide
void divide(int num1)
void divide(int num1, int num2)
void divide(int num1, int num2, int num3)
Answered by
0
Concept Introduction: Class and Parameters are a part of programme writing in JAVA.
Explanation:
We have been Given: Consider a class that has a method, divide, which takes the input parameter as integer data
types only.
We have to Find: How many parameters can on overload function have if there is a predefined
method with three parameters?
Four Overload Function can be defined:
- void divide
- void divide(int num1)
- void divide(int num1, int num2)
- void divide(int num1, int num2, int num3)
Final Answer: Four Overload Function can be defined:
- void divide
- void divide(int num1)
- void divide(int num1, int num2)
- void divide(int num1, int num2, int num3)
#SPJ2
Similar questions