In: Computer Science
Which of the following is sufficient for 2 methods to overload?
Note: sub/super means the methods are in two classes that are in an inheritance relationship.
Select one:
a. Same signature, same class
b. Different signature but same name, same class
c. Different signature including different name, same class
d. Different signature but same name, sub/super class
e. If you think more than one of the above are sufficient for 2 methods to overload, select this option
[Java]
Answer :
Different signature but same name, same class is sufficient for 2 methods to overload.
Explanation :