Computer Science, asked by dhirendrapathak09, 2 months ago

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 ChaitanyaSingh253
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 anirudhayadav393
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:

  1. void divide
  2. void divide(int num1)
  3. void divide(int num1, int num2)
  4. void divide(int num1, int num2, int num3)

Final Answer: Four Overload Function can be defined:

  1. void divide
  2. void divide(int num1)
  3. void divide(int num1, int num2)
  4. void divide(int num1, int num2, int num3)

#SPJ2

Similar questions