204k views
4 votes
Which of the following is true?

a. If methods have the same name but different value it iscalled overloading methods.

b. If methods have the same name but same value it iscalled overloading methods.

c. If methods have the same parameter but different valueit is called underloading methods.

d. If methods have the same header but different valueit is called reloading methods.

User Sinbar
by
6.9k points

1 Answer

4 votes

Answer:

None of them is true.

Step-by-step explanation:

Option a and option b are false because overloading methods means the methods in the same class with the same name in which the methods have different argument lists. The argument lists differ that can be due to (1) different number of parameters or (2) different data type of parameters or (3) different sequence of parameters ( ex - swapped parameters).

Option c is false as there is no concept called underloading methods

Option d is false as there is no concept called reloading methods.

User Membersound
by
7.1k points